Why isn't my automation triggered when the weather turns sunny?

I am trying to create an automation that should trigger when the weather turns sunny at home, to turn off the indoor lights.

It simply will not trigger. Do you guys see any issue with it?

alias: Weather changes to sunny when someone is at home
description: ''
trigger:
  - platform: state
    entity_id: weather.smhi_home
    to: sunny
condition:
  - condition: zone
    entity_id: person.nick
    zone: zone.home
  - condition: time
    after: '09:00:00'
    before: '18:00:00'
action:
  - service: script.adjust_indoor_lights_for_a_bright_day
  - service: notify.notify
    data:
      message: Adjusted indoor lights for a sunny day
      title: It's sunny outside! :)
      data:
        actions:
          - action: IGNORE
            title: Turn on lights
          - action: CHILL_MODE
            title: Chill out
  - wait_for_trigger:
      - platform: event
        event_type: mobile_app_notification_action
        event_data:
          action: IGNORE
      - platform: event
        event_type: mobile_app_notification_action
        event_data:
          action: CHILL_MODE
  - choose:
      - conditions:
          - condition: template
            value_template: '{{ wait.trigger.event.data.action == "IGNORE" }}'
        sequence:
          - service: scene.turn_on
            target:
              entity_id: scene.default_scene_when_someone_is_at_home
      - conditions:
          - condition: template
            value_template: '{{ wait.trigger.event.data.action == "CHILL_MODE" }}'
        sequence:
          - service: scene.turn_on
            target:
              entity_id: scene.chill_time
mode: single

did you try with the apostroph?
i’m not sure of the english name, here is a picture

image

1 Like

Thanks. I haven’t tried that. Will do :slight_smile:

Confirmed working now after adding single quotes. Thanks!