Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blueprint upgrades #134

Merged
merged 2 commits into from
Dec 22, 2024
Merged

Conversation

rappazzo
Copy link
Contributor

This is a repeat of the commit comments, which I think are pretty descriptive

Change 1: re-implement cooldown with singlemode execution and a delay

Force the automation to use single mode with suppressed warnings (see here). To implement the cooldown, add a delay as the last action in the actions. Also remove the cooldown from the automation conditions.

The main difference here is that no new triggers will arrive while the automation is running. The condition is smaller now, and is limited to the content of the automation, and not managing how the automation is run. With this narrowing, it opens up the possibility of adding other conditions to the blueprint config in the future.

Change 2: blueprint: add a filter for frigate object detection

The frigate payload includes a label which indicates what the detected object is. This can be useful to separate llm-vision automations to react differently for different objects.

For example, if a bird is detected, the ai instructions could include something like, "if you see a bird, try to identify what species it is". This discription doesn't make much sense if the detected object is a person, and including separate instructions to the ai makes it more confusing on both the human and ai side of things. Allowing for separate instructions by object will make for easier to understand automations.

Force the automation to use single mode with suppressed warnings (see
https://www.home-assistant.io/docs/automation/modes/).  To implement
the cooldown, add a delay as the last action in the actions.  Also
remove the cooldown from the automation conditions.

The main difference here is that no new triggers will arrive while the
automation is running.  The condition is smaller now, and is limited
to the content of the automation, and not managing how the automation
is run.  With this narrowing, it opens up the possibility of adding
other conditions to the blueprint config in the future.
@rappazzo rappazzo force-pushed the blueprint-upgrades branch 2 times, most recently from af4dd16 to 2880019 Compare December 21, 2024 14:06
Copy link
Owner

@valentinfrlch valentinfrlch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contributions! This is a very welcome addition and a much requested feature as well. Have you tested the updated blueprint?

@rappazzo
Copy link
Contributor Author

I think I have one small error in the jinja (it doesn't support len), I'll update in a bit.

The frigate payload includes a label which indicates what the detected
object is.  This can be useful to separate llm-vision automations to
react differently for different objects.

For example, if a bird is detected, the ai instructions could include
something like, "if you see a bird, try to identify what species it is".
This discription doesn't make much sense if the detected object is a
person, and including separate instructions to the ai makes it more
confusing on both the human and ai side of things.  Allowing for
separate instructions by object will make for easier to understand
automations.
@rappazzo
Copy link
Contributor Author

rappazzo commented Dec 21, 2024

OK, I fixed the length issue. It tests fine and the automation seems to continue with and without objects defined in the config.

Of course, I would suggest that you also test this before merging if you have a frigate instance.

@valentinfrlch valentinfrlch merged commit ec091e6 into valentinfrlch:main Dec 22, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants