[BUG] Docs: ha automation example is not suitable for testing with one camera
See original GitHub issuetrigger.{to|from}_state.state in my configuration is a name of camera
I have only one camera, so that state never changes.
condition:
- condition: template
value_template: '{{ trigger.to_state.state != trigger.from_state.state }}'
Please consider providing better example for users with one camera and without spamming with notifications. Maybe some timer ? I don’t know… how to solve this
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:13
Top Results From Across the Web
Getting error for all automation conditions "Unsupported ...
I am getting an error on all my automations; I could have sworn they were all working fine a few days ago. I've...
Read more >Generic IP camera - was working on 2022.3.8, stopped after ...
The problem Cameras were working fine, after upgrade to 2022.4.0 they aren't loading anymore. I can play normally from VLC.
Read more >Frigate and Home Assistant - YouTube
An indepth look at how Frigate integrates into Home Assistant. Using the Frigate HACS integration we can look at our live video streams, ......
Read more >Install Bot Agent and register device
Prerequisites · A Bot Creator can log in and access both Automation 360 and Enterprise 11 client to create bots. · Attended Bot...
Read more >Awesome Home Assistant
Home Assistant is an open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So there are some wires getting crossed here. The single mode suggestion was to make it so notifications only came in once every x seconds. This would not work with two people coming in at the same time, just like a motion-sensor-like version, because it still holds one state at a time.
It really comes down to priorities, if you have a priority of not so many notifications then a timer will work at the cost of not working for two people coming in at the same time. If make sure it always sends a notification for multiple people that enter at the same time then the default automation will send many notifications. It is possible to get both but will take crafting of the automation and conditions instead of just using the basic example that was provided in the docs (which is meant to be built upon for specific use cases).
The solution to get the behavior you want in both cases is to not use a timer and instead allow double-take with a automation mode of “parallel” and add conditions comparing the
from_state
andto_state
to only fire when useful information is preset. Currently that sensor in the automation example will send a new notification on every snapshot that double-take finds.So: ‘{{ trigger.to_state.state.attributes.id != trigger.to_state.state.attributes.id }}’ & ‘{{ trigger.from_state.state.attributes.id != trigger.from_state.state.attributes.id }}’
That does not work. The automation does not get triggered