HA yelled at me this morning because it no longer likes my years-old automation based on my binary_sensor from my Ring Doorbell. This was my old automation:
But now I guess it wants me to use the Ding event rather than the binary_sensor:
I just can’t figure out what the syntax would be. The entity_id of the ding event is event.front_door_ding. Can anyone help?
Yes, event entities return a timestring for their state; just like the other “stateless” entity types: button, input_button, scene, and conversation. This timestring is when the event last occurred.
By using an open State trigger (without a defined to or from), the trigger will fire whenever the state updates. The attributes of the event entity should be static. If you want to be extra safe and guard against the possibility that an attribute change causes the trigger to fire, you can add a to or from or one of the “not” variations as follows:
trigger:
- platform: state
entity_id: event.front_door_ding
not_to: unknown
What you show appears to be the legacy syntax, but it should work that way and continue to work that way al-be-it with a warning that it’s legacy syntax from Code Server Ha extension.
Unfortunately I dismissed the notifications a little too quickly, but I think it said that the binary_sensor would be removed in 2024.11.0. I’m not sure if it is a HA thing or specific to the Ring integration. But we’ll know in a couple of days!