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

Turn on lights at sunset and on/off sun for dates not working?

$
0
0

What’s up community!
I have this automation that does not seem to be working as expected. I’m not finding anything jumping out of me in the traces for it either.
The automation is supposed to turn the lights on at Sunset and then off at sunrise only between February 8th through the 15th. It is not turning them on to begin with.

Here’s the automation yaml:

alias: Garage lights on/off sun - Valentine's Day
description: ""
triggers:
  - trigger: sun
    event: sunset
    offset: 0
conditions:
  - condition: and
    conditions:
      - condition: template
        value_template: "{{ (8 <= now().day <= 15) and (now().month == 2) }}"
actions:
  - action: light.turn_on
    metadata: {}
    data:
      rgb_color:
        - 255
        - 0
        - 255
      brightness_pct: 100
    target:
      entity_id: light.garage_lights_group
  - delay: "{{ states('sensor.time') < states('sun.sunrise') }}"
  - action: light.turn_off
    metadata: {}
    data: {}
    target:
      entity_id: light.garage_lights_group
mode: single

Can someone take a look and offer assistance?

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 105627

Trending Articles



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