Hi all,
Looking to see if I re-made a custom smartapp correctly in webCoRE. It seems to work but always looking for peer review to see if it can be done better.
I have a Sighthound camera system that will trigger an IFTTT event. That IFTTT event then flips a virtual switch (VS) that I have manually added to my list of Devices (it is an “On/Off Button Tile”).
What the custom smartapp did (which I can post if needed?) was if the VS was flipped, and it was between sunset and sunrise, and if the physical switch was already off (so had not been turned on manually already - this was the kicker), then turn on the physical switch for X minutes.
Once X minutes expired, it would turn off the VS which, in turn, would turn off the physical switch.
As mentioned above, if the physical switch was already on when the camera system triggered the IFTTT event, the VS would come on but then turn itself back off without changing the state of the physical switch. Basically, it had a physical override as to prevent it from going off and on repeatedly when we were triggering the camera but just wanted the switch to be kept on.
Whew. Congrats if you got thru all of that.
“Switch 1” is the Virtual switch (shows up as a physical device in webCoRE) and Switch 6 is the real physical switch in my wall that controls lights.
I wish the lightening bolt would show up in the green output. It would be next to both “Switch 1’s switch changes to…” at the start of each “if” statement.
Thanks!!