Automation doesn't work.......why?

I made this automation, but it works only if all devices are at home
If only device_tracker.22_e0_9b_17_ff_08 is at home the automation doesn’t work
Why ?

- id: Trigger corridoio on
  alias: Trigger corridoio on
  mode: queued
  trigger:
    platform: state
    entity_id: binary_sensor.sensore_movimento_corridoio_ias_zone, binary_sensor.sensore_movimento_corridoio_2_ias_zone
    from: 'off'
    to: 'on'
  condition:
  - condition: and
    conditions:
    - condition: time
      after: 07:30:00
      before: 00:30:00
    - condition: or
      conditions:
      - condition: zone
        entity_id: device_tracker.22_e0_9b_17_ff_08
        zone: zone.home
      - condition: zone
        entity_id: device_tracker.06_da_cd_d5_7d_f6
        zone: zone.home
  action:
    service: switch.turn_on
    target:
      entity_id: switch.corridoio

Have you tried this?

  condition:
  - condition: and
    conditions:
    - condition: time
      after: 07:30:00
      before: 00:30:00
    - condition: or
      conditions:
      - condition: state
        entity_id: device_tracker.22_e0_9b_17_ff_08
        state: zone.home
      - condition: state
        entity_id: device_tracker.06_da_cd_d5_7d_f6
        state: zone.home

I don’t think this is the problem 'couse when we are both at home the automation is working good

I tried but nothing changed…

Have you check the automation traces?

1 Like

Solved thank you all

What was the solution?

deleted and reconfigured the entity tracker