Possibility to specify Switch state ON/OFF when Wifi Signal is lost #20225
Replies: 4 comments 7 replies
-
In Tasmota, a "Switch" is a input signal tight to the state to the external signal it is attached to. You can't change it So you could define what we call a 'virtual relay' connected to a free gpio and use rules triggered by 'on wifi#connected' and 'on wifi#disconnected' to change the power state. That change will then be reported |
Beta Was this translation helpful? Give feedback.
-
Thanks, indeed I'm not interested in the reporting to HA if the wifi get's disconnected... ;) But I did not know I can make rules in the tasmota device it self. I will look into that. Thanks |
Beta Was this translation helpful? Give feedback.
-
A quick look into the syntax: Rule1 ON Wifi#Disconnected DO Power On ENDON The first line is the Rule1 syntax to do exactly what I would like and line number 2 actually enables Rule1. Feedback that I get in the terminal: Seems now that the device is actually switched on, while it is actively connected to Wifi. So I'm lost here. Why does the Rule1 enables the switch, while it is connected to WIfi? |
Beta Was this translation helpful? Give feedback.
-
So, the Wifi#Disconnected now seems to work nicely. Jeehaa, thanks for putting me into the right direction. It would also be nice when the wifi is restored that it actually takes over the state that was last reported prior to losing the Wifi signal. The actual state I would like to have it, is stored in MQTT as HA writes the state into MQTT. So when the signal get's restored it should read the last MQTT state message. Any suggestions there? |
Beta Was this translation helpful? Give feedback.
-
I have searched if this feature is already included, but can't find it.
I have a tasmota switch (ShellyPlug S flashed). It work nicely, however when the Wifi signal gets lost I can't control the device anymore from HA obviously. However the state of the swtich is important. It should switch ON to make sure that the device connected to this switch keeps running. So I was wondering if there is an option available to specify the state of the switch in case the wifi signal is lost.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions