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

Need help with sunrise sunset automation

$
0
0

I’ve got an automation for to have a switch turn on the sunsets and turn off for sunrise. The only problem is it turns on for sunset but not off for sunrise. I’m sure I’m missing something easy but I can’t figure it out. Any help would be appreciated. Thanks

alias: Light Sunset/Sunrise
description: Turn light on at sunset and off at sunrise
trigger:
  - platform: sun
    at: sunset
action:
  - service: "switch.turn_{{ 'on' if trigger.platform == ‘sun’ else 'off' }}"
    entity_id: switch.frontporch
mode: single

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 105620

Trending Articles



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