Sonoff Basic Tasmota Garage Door timer

I’ve got a sonoff switch with tasmota firmware controlled via MQTT. It works great!
Currently I have added Sonoff switch (with tasmota firmware) in Home Assistant and Smartthings as well.
My plan is to make some configurations to be able to open and close garage door.
I’m also prepared to removed the pathways with the Dremel from BOTH sides of the circuit board as per
https://web.archive.org/web/20171020183932/http://www.boized.com/2017/02/how-to-convert-wifi-sonoff-into-dry.html

I don’t know exactly how to trigger garage door only for 1s or less in Home Assistant switch.

Current configuration of my Sonoff Switch in configuration.yaml is:

switch 1:
- platform: mqtt
  name: "sonoff"
  state_topic: "stat/sonoffst/POWER"
  command_topic: "cmnd/sonoffst/power"
  payload_on: "ON"
  payload_off: "OFF"
  qos: 1
  retain: true  

I’ve also found instruction how to set timer using MQTT for openHAB http://www.instructables.com/id/Sonoff-Garage-Door-Opener/
but not sure how implement it in HA.

tried with automations.yaml

- action:
  - data:
      entity_id: switch.sonoff
    service: script.turn_on
  alias: Garage Door Timer
  condition: []
  id: '1524578284492'
  trigger:
  - entity_id: switch.sonoff
    from: 'off'
    platform: state
    to: 'on'
    for:
      seconds: 2

Thank you in advance for help.

P.S. I’m pretty new to HA so…

Maybe this would help.

1 Like

can’t believe it that it helped, I’ve tried few times that solution and one things that I did wrong it was

to: 'ON'

should be

to: 'on'

thank you so much for help

1 Like