I made an automation for the weather alert (in France) to notify me when it’s necessary.
But, the state is update every 6h, and HA notify me for the same thing.
Do you know how can I avoid this repetition ?
Your automation as written will trigger anytime sensor.city_weather_alert changes, for whatever reason even if it’s just the attributes changing and not the state. You are missing some sort of condition to only notify you “when it’s necessary”. Either 1) set the trigger to notify for only the specific states you want, or b) use a condition to prevent unwanted alerts from sending the notification.
You right, but I don’t find the good solution, because the possibilities are Green or Orange or red and I would like to know when the state changing, in every way (Green to Orange or Red, but Orange or Red to green too).
If I use in the trigger From or To, it’s not good.
For #a, you just list the different combinations of from and to. For #b you can write some template code to return True only for the cases you want. If you are using the UI to create automations, it’s very simple to add multiple triggers.
I have a other case for my problem. I want to avoid a repetition an I explain to you :
When I want to turn on my light when I open my door, but I don’t want to trigger again when I open my door again . This is my current automation. Can I block my trigger during some minutes ?
Could I have some help ?
- alias: Light on
trigger:
platform: state
entity_id: binary_sensor.entry_door
to: "on"
condition: