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

Event not triggered?!

$
0
0

I want to turn a switch on/off if the sun rises/sets.

If I run it manually it just works! But if I wait for the sun.rise and sun.set events to get triggered, nothing happens… (I already enabled all entities of the “sun” service).

alias: Toggle corridor light based on sun
description: ""
trigger:
  - platform: sun
    event: sunrise
    offset: "00:00:03"
  - platform: sun
    event: sunset
    offset: "00:00:03"
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: sun.sun
            state: above_horizon
        sequence:
          - action: switch.turn_off
            metadata: {}
            data: {}
            target:
              entity_id: switch.shelly_plug1_output
      - conditions:
          - condition: state
            entity_id: sun.sun
            state: below_horizon
        sequence:
          - action: switch.turn_on
            metadata: {}
            data: {}
            target:
              entity_id: switch.shelly_plug1_output
mode: single

3 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 106793

Trending Articles



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