Hi to all, I have 2 automation that work with a single timer, 1 for the day and one for the night.
The first work perfectly from the begin, the second I don’t understand why doesn’t work.
This is the first
alias: Back Home
description: ''
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.backhome
condition:
- condition: time
after: '07:00'
before: '23:00'
action:
- service: browser_mod.navigate
data:
navigation_path: /lovelace-casa/home
mode: single
And the second that doesn’t work is
alias: Back Home Notturno
description: ''
trigger:
- platform: event
event_type: timer.finished
event_data:
event_id: timer.backhome
condition:
- condition: or
conditions:
- condition: time
after: '23:01'
- condition: time
before: '06:59'
action:
- service: browser_mod.navigate
data:
navigation_path: /lovelace-casa/screensaver
- service: shell_command.turn_off_display
mode: single
You don’t need the or condition.
If you have an ‘after’ and a ‘before’ time condition it will span midnight.
Also you will want to change it so it is after: '23:00' and before: '07:00' otherwise you will be missing out of 2 minutes of the day.
I’m not sure if that is the problem or not, but it might be a start.
Have you tried the automation debugger? See if you can find your automation that’s not working here. You might need to add a unique ID to the automations, also described here.