I have a Tasmota shutter switch with these rules:
type or paste code here
"19:03:01.127 MQT: stat/estore_quarto/RESULT = {"Rule1":{"State":"ON","Once":"OFF","StopOnError":"OFF","Length":191,"Free":320,"Rules":"ON Event#Open DO Power1 ON ENDON ON Power1#State=1 DO Publish stat/estore_quarto/POWER {\"STATE\":\"OPENING\"} ENDON ON Power1#State=0 DO Publish stat/estore_quarto/POWER {\"STATE\":\"OPEN\"} ENDON"}}
> 19:03:01.152 MQT: stat/estore_quarto/RESULT = {"Rule2":{"State":"ON","Once":"OFF","StopOnError":"OFF","Length":192,"Free":319,"Rules":"ON Event#Close DO Power3 ON ENDON ON Power3#State=1 DO Publish stat/estore_quarto/POWER {\"STATE\":\"CLOSING\"} ENDON ON Power3#State=0 DO Publish stat/estore_quarto/POWER {\"STATE\":\"CLOSED\"} ENDON"}}
> 19:03:01.181 MQT: stat/estore_quarto/RESULT = {"Rule3":{"State":"ON","Once":"OFF","StopOnError":"OFF","Length":144,"Free":367,"Rules":"ON Event#Stop DO Backlog Power1 OFF; Power3 OFF; Power2 ON ENDON ON Power2#State=1 DO Publish stat/estore_quarto/POWER {\"STATE\":\"STOPPED\"} ENDON"}}"
and these:
"Rule1
ON Event#Open DO Power1 ON ENDON
ON Power1#State=1 DO Publish stat/estore_quarto/POWER {"STATE":"OPENING"} ENDON
ON Power1#State=0 DO Publish stat/estore_quarto/POWER {"STATE":"OPEN"} ENDON
Rule2 ON Event#Close DO Power3 ON ENDON ON Power3#State=1 DO Publish stat/estore_quarto/POWER {"STATE":"CLOSING"} ENDON ON Power3#State=0 DO Publish stat/estore_quarto/POWER {"STATE":"CLOSED"} ENDON
Rule3 ON Event#Stop DO Backlog Power1 OFF; Power3 OFF; Power2 ON ENDON ON Power2#State=1 DO Publish stat/estore_quarto/POWER {"STATE":"STOPPED"} ENDON
pulsetime1 112
pulsetime2 1
pulsetime3 112
Backlog Delay 50; Interlock 1,2,3; Interlock on; PowerOnState 0; PowerRetain 0; setoption1 1; setoption26 1; Restart 1"
and in HA I have at cover.yaml:
"# Estore Quarto
- cover:
name: "Estore Quarto"
device_class: shutter
command_topic: "cmnd/estore_quarto/Backlog"
state_topic: "stat/estore_quarto/POWER"
position_topic: "stat/estore_quarto/POSITION"
set_position_topic: "cmnd/estore_quarto/POSITION"
availability_topic: "tele/estore_quarto/LWT"
qos: 1
retain: true
payload_open: "Event Open"
payload_close: "Event Close"
payload_stop: "Event Stop"
payload_available: "Online"
payload_not_available: "Offline"
optimistic: false
position_open: 100
position_closed: 0
set_position_template: "{{ position }}"
value_template: >
{% if value_json.STATE == 'OPENING' %}
opening
{% elif value_json.STATE == 'OPEN' %}
open
{% elif value_json.STATE == 'CLOSING' %}
closing
{% elif value_json.STATE == 'CLOSED' %}
closed
{% elif value_json.STATE == 'STOPPED' %}
stopped
{% else %}
unknown
{% endif %}"
But when I move the slider (atached picture) noting happens. Tasmota reports:
"19:06:27.911 MQT: stat/estore_quarto/RESULT = {"Command":"Unknown"}"
I would like to use that based on the pulstime (112) that the shutter takes to open and close, without messing with the rest of the code.