I have a couple of automations which work fine without the sun component integrated but fail to trigger when I include the sun as a condition. I’m not sure what I have done wrong. Can someone please help?
passage_night_light.yaml
alias: Passage Night Light
trigger:
- platform: state
entity_id: binary_sensor.passage_multi_sensor_sensor
to: 'on'
#condition: or
condition:
- condition: sun
after: sunset
after_offset: '03:00:00'
- condition: sun
before: sunrise
before_offset: '00:30:00'
action:
- service: homeassistant.turn_on
entity_id: light.gateway_light_34ce008d5245
- delay: '00:01:00'
- service: homeassistant.turn_off
entity_id: light.gateway_light_34ce008d5245
this works only if I # out the sun related conditions.
kitchen_light_auto.yaml
alias: Kitchen Light Auto
trigger:
- platform: state
entity_id: binary_sensor.kitchen_multi_sensor_sensor
to: 'on'
#condition: or
condition:
- condition: sun
after: sunset
after_offset: '00:30:00'
- condition: sun
before: sunrise
before_offset: '00:30:00'
action:
- service: homeassistant.turn_on
entity_id: light.kitchen_light_level
# brightness: 100
- delay: '00:02:00'
- service: homeassistant.turn_off
entity_id: light.kitchen_light_level
this one has the same issue. I also cant seem to work out how to set the brightness in the kitchen automation, hence its #'d out.
WHat have I done wrong in these for the sun condition to not work?