Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 105567

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

$
0
0

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

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 105567

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>