I have this “new” improved automation which isn’t working at all.
I had a previous working version (below) but was trying to refine it so that the lights would come on in the hours of darkness, rather than just up to midnight which is what appeared to be happening…
Any hints gratefully received.
Krispii
alias: Front Door
trigger:
- entity_id: binary_sensor.0x00158d00031dfcac_contact
from: 'off'
platform: state
to: 'on'
conditions:
conditions and: # 'twilight' condition: dusk and dawn, in typical locations
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: state
entity_id: light.tristate_08000a_10
state: 'off'
action:
- data:
entity_id: group.front_door
service: homeassistant.turn_on
- delay: '300'
- data:
entity_id: group.front_door
service: homeassistant.turn_off
I changed this from:
alias: Front Door
trigger:
- entity_id: binary_sensor.0x00158d00031dfcac_contact
from: 'off'
platform: state
to: 'on'
condition:
- after: sunset
after_offset: -01:00:00
condition: sun
- condition: state
entity_id: light.tristate_08000a_10
state: 'off'
action:
- data:
entity_id: group.front_door
service: homeassistant.turn_on
- delay: '300'
- data:
entity_id: group.front_door
service: homeassistant.turn_off