Norien / Home-Assistant-Config

:house: Home Assistant configuration
94 stars 12 forks source link

Front door light automation did not fire #126

Closed Norien closed 7 years ago

Norien commented 7 years ago

Should trigger on sunset

Norien commented 7 years ago

switched out the trigger

  - alias: 'theme_light'
    initial_state: 'on'
    trigger:
      - platform: state
        entity_id: sun.sun
      - platform: state
        entity_id: input_boolean.away
        to: 'off'
    condition:
      - condition: template
        value_template: '{{states.input_boolean.away.state == "off" and states.sun.sun.state == "below_horizon"}}'
    action:
      - service: light.turn_on
        data:
          entity_id:
            - light.front_door
          brightness: 250
        data_template:
          rgb_color: [ "{{ states.sensor.theme_color.state.split(',')[0]|int }}", "{{ states.sensor.theme_color.state.split(',')[1]|int }}", "{{ states.sensor.theme_color.state.split(',')[2]|int }}" ]

Seems to be working when I switch sun.sun state manually. I'll close this for now but if it fails tonight I will reopen