Hi,
I have two automations. One is to switch on two lights when device_tracker.e4_46_da_73_3d_94 is home, the other is to switch the same two lights off when device_tracker.e4_46_da_73_3d_94 is away.
It is registered (as per logbook), that device_tracker.e4_46_da_73_3d_94 is home or away.
And when home is registered, the automation runs and the two lights are switched on.
However, the away part is not working. It is registered fine as per logbook that device_tracker.e4_46_da_73_3d_94 is away, but the automation is not triggered.
How can that be? I have tried other combinations with the state from home to away, capital letters, etc. But no luck. I just do not see what are the differences between the two automations?
- id: '1595725165750'
alias: light_gang_on
description: ''
trigger:
- entity_id: device_tracker.e4_46_da_73_3d_94
platform: state
to: home
condition: []
action:
- device_id: c67be167c7a7458fb2553e424313bff0
domain: light
entity_id: light.gang_1
type: turn_on
- device_id: 5ceec93fd3414b68b1c88aef5b9ebc74
domain: light
entity_id: light.gang_2
type: turn_on
mode: single
- id: '1596634386395'
alias: light_gang_off
description: ''
trigger:
- entity_id: device_tracker.e4_46_da_73_3d_94
platform: state
to: away
condition: []
action:
- device_id: c67be167c7a7458fb2553e424313bff0
domain: light
entity_id: light.gang_1
type: turn_off
- device_id: 5ceec93fd3414b68b1c88aef5b9ebc74
domain: light
entity_id: light.gang_2
type: turn_off
mode: single