Sunset trigger automation not working anymore from one day to another

I don’t know what happened, but it doesn’t start automatically anymore…

If I run it manually it works, all entered entities are still correct and working.

May I have to change anything because of some HA update?

alias: Crepuscolare luci interne
description: ""
trigger:
  - platform: sun
    event: sunset
    offset: "-00:25:00"
condition:
  - condition: device
    device_id: b637c5c1debe261c6c9d2362083670f9
    domain: device_tracker
    entity_id: device_tracker.samsung_galaxy_s22_ultra_5g
    type: is_home
  - condition: or
    conditions:
      - condition: device
        device_id: 349b64cefa291812771bfb1457ec11f4
        domain: device_tracker
        entity_id: device_tracker.samsung_galaxy_a72
        type: is_home
  - condition: or
    conditions:
      - condition: device
        device_id: cb6d48c62f06c3737e9bcbffb7492676
        domain: device_tracker
        entity_id: device_tracker.samsung_galaxy_s8
        type: is_home
action:
  - type: turn_on
    device_id: 689de1d82525d728110a9b952d58d9ef
    entity_id: switch.shelly_1_v3_piantana_angolo
    domain: switch
  - type: turn_on
    device_id: 25a68a03dbdc712fb9c978f5f5e3f088
    entity_id: light.shelly_1_v3_bajour_corridoio
    domain: light
  - type: turn_on
    device_id: 896b6cde19a3c1736080f1800d759969
    entity_id: light.shelly_1_v3_bajour_camerette
    domain: light
mode: single

As its name suggests, the “Run Actions” button skips the condition section completely. Your Or conditions are set up incorrectly. The way you currently have it set up, all 3 device trackers must be home to allow the actions to execute. Any conditions you want to have behave as “or” need to be nested beneath the same Or condition.

condition:
  - condition: or
    conditions:
      - condition: device
        device_id: b637c5c1debe261c6c9d2362083670f9
        domain: device_tracker
        entity_id: device_tracker.samsung_galaxy_s22_ultra_5g
        type: is_home
      - condition: device
        device_id: 349b64cefa291812771bfb1457ec11f4
        domain: device_tracker
        entity_id: device_tracker.samsung_galaxy_a72
        type: is_home
      - condition: device
        device_id: cb6d48c62f06c3737e9bcbffb7492676
        domain: device_tracker
        entity_id: device_tracker.samsung_galaxy_s8
        type: is_home
1 Like

Thank you I’ve edited now the YAML, but I will have to wait 'till tomorrow’s sunset to see if it works hehe. :grin:

Sorry for bothering again.

What if I would like to use the entity device_tracker.cr4z33_galaxy_s22_ultra_5g for one of the conditions instead of a device?