Very simple automation doesn't work

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.

No, it isn’t that the problem.
My original automation is like your, after I span midnight because doesn’t work, but it doesn’t work anyway

I can only see the condition has being different to the ‘norm’. Try this;

  condition:
  - after: '23:00'
    before: '07:00'
    condition: time

Nope.
I duplicate the first automation and change the functions, now it works, but I don’t know why

alias: Back Home Night Mode
description: ''
trigger:
  - platform: event
    event_type: timer.finished
    event_data:
      entity_id: timer.backhome
condition:
  - condition: time
    after: '23:00'
    before: '07:00'
action:
  - service: browser_mod.navigate
    data:
      navigation_path: /lovelace-casa/screensaver
  - service: shell_command.turn_off_display
mode: single

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.

In your automation that didn’t work you have:

trigger:
  - platform: event
    event_type: timer.finished
    event_data:
      event_id: timer.backhome

and in the automation that did work you have:

trigger:
  - platform: event
    event_type: timer.finished
    event_data:
      entity_id: timer.backhome

You put event_id instead of entity_id

Ah ok, i made it with visual editor.
Maybe it wrong something.
Thanks for the good eye!