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

Sunset and sunrise condition should be easy but

$
0
0

Hello everyone,
I have an automation where I only want it to run at night, after sunset, and before the sunrise. I set it up with an OR and it still says the condition was not valid.
Does this look correct to everyone or did I do something wrong?
Here is my automation that shuts turns on my shelly for 10 mins with an MQTT event.

- id: '1649213236173'
  alias: Back Porch Light Person Auto
  description: ''
  trigger:
  - platform: mqtt
    topic: frigate/back_alley/person
  condition:
  - condition: or
    conditions:
    - condition: sun
      before: sunrise
      before_offset: 00:30:00
      after: sunset
      after_offset: 01:00:00
  action:
  - type: turn_on
    device_id: 7e44d09d6956eae7188f98c77e3130c5
    entity_id: switch.shelly1_98f4abf2a6b6
    domain: switch
  - delay:
      hours: 0
      minutes: 10
      seconds: 0
      milliseconds: 0
  - type: turn_off
    device_id: 7e44d09d6956eae7188f98c77e3130c5
    entity_id: switch.shelly1_98f4abf2a6b6
    domain: switch
  mode: single

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 103143

Trending Articles



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