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

Automation Based on Door Sensor and Sun State not working

$
0
0

I am trying the following automation

if my garage door is opened between the Sunset and Sunrise I wanted to turn on the Garage light Switch.

I also wanted to turn of the lights 5 minutes after the door is closed, ( I haven’t added this part yet, as I am not sure how do do that)

Here is my Automation YAML

alias: Tun on the Garage Lights if Garage Entrance Door is open
description: ''
trigger:
  - platform: state
    entity_id: binary_sensor.garage_door
    from: 'off'
    to: 'on'
condition:
  - condition: sun
    after: sunset
    before: sunrise
action:
  - service: switch.turn_on
    target:
      entity_id: switch.garage_light_mss550x_main_channel
mode: single

My automation is not triggering or running, can someone tell me what am I doing wrong here? Also can you please guide me on what configuration I have to add to turn of the lights 5 mins after I close the door

2 posts - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106336

Trending Articles



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