I’m trying to set up a “Water Change” virtual switch with a fallback in case it’s activated inadvertently or someone forgets to restart the tank. Especially important IMO because I’m linking the switch to Alexa. According to the documentation and forum posts the syntax is:
When ON > mmm:ss Then OFF
Full switch code I’m using:
#10second trial, I’ve used many different numbers though. Final code would be like an hour.
Everything about this is working correctly with the corresponding pump code. However, the switch never turns off, and therefore my pumps never turn back on unless I manually do it. The When command was added specifically to turn off a switch/plug if it has been on a certain period of time, but this isn’t working at all for me.
As far as I can tell from testing, it seems to be because the switch is being activated with a manual ON that can’t be overridden with the When command. When I drop similar code into my light, it works, but only if the light starts on AUTO. If it starts OFF or ON I can’t change its status with the When command. And after the code is done, it’s fixed in either ON or OFF and not AUTO anymore; seems like that could be an issue as well. Setting AUTO doesn’t seem to be an option in code.
Another weird little quirk: “When ON....” is sent to the apex and I then go back into the switch code it changes to “When On” yet it seems ON/OFF are always fully capitalized.
Am I missing something, is this a half-baked feature, or am I maybe trying to use it beyond what it’s intended for? Thoughts, ideas, suggestions?
When ON > mmm:ss Then OFF
Full switch code I’m using:
Code:
Fallback OFF
Set OFF
When ON > 000:10 Then OFF
#10second trial, I’ve used many different numbers though. Final code would be like an hour.
Everything about this is working correctly with the corresponding pump code. However, the switch never turns off, and therefore my pumps never turn back on unless I manually do it. The When command was added specifically to turn off a switch/plug if it has been on a certain period of time, but this isn’t working at all for me.
As far as I can tell from testing, it seems to be because the switch is being activated with a manual ON that can’t be overridden with the When command. When I drop similar code into my light, it works, but only if the light starts on AUTO. If it starts OFF or ON I can’t change its status with the When command. And after the code is done, it’s fixed in either ON or OFF and not AUTO anymore; seems like that could be an issue as well. Setting AUTO doesn’t seem to be an option in code.
Another weird little quirk: “When ON....” is sent to the apex and I then go back into the switch code it changes to “When On” yet it seems ON/OFF are always fully capitalized.
Am I missing something, is this a half-baked feature, or am I maybe trying to use it beyond what it’s intended for? Thoughts, ideas, suggestions?