Garage door switch

I have a garage door switch. Currently with no sensor. What i would like to do is have the switch reset to off after it is turned on. I cant seem to work out how to do this.

Hey @MrRulke, im not an expert on this, but the Automation examples should help.


I think the second part could work.
- alias: Turn off switch garage
  trigger:
    platform: state
    entity_id: switch.garage_door
    to: 'on'
    for:
      minutes: 10
  action:
    service: switch.turn_off
    entity_id: switch.garage_door

Greets
Rainer

2 Likes

found this and it works great.

thanks you got me on the right path for this. my first automation.

automation:
- alias: 'Reset Garage Relay'
  trigger:
    - platform: time
      seconds: '/5'
  condition:
    - condition: state
      entity_id: switch.garage_door_switch_3_0_2
      state: "on"
  action:
    - service: switch.turn_off
      entity_id: switch.garage_door_switch_3_0_2

in here https://github.com/arsaboo/homeassistant-config/blob/master/automation.yaml

1 Like