Problem with Hubitat virtual switch driving IFTTT

Hey guys. Need some advice please.

I have some virtual switches in Hubitat which control IFTTT in order to trigger lights/sockets on/off (SmartLife & eWelink). It works fine (albeit a little slow due to the classic IFTTT cloud responsiveness). The problem I have is if the light/socket gets turned on outside of Hubitat then the virtual switch in Hubitat is still off, and when my RM rule runs to turn the virtual switch off, it seems because it's already off the command doesn't get sent to IFTTT and the device stays on. The virtual switch has to change its state in Hubitat in order to trigger the IFTTT routine.

It seems to me it would be useful if a device in Hubitat which receives a command to change its status should issue that commend through to IFTTT irrespective of its current status. So if its already off and it receives a command to turn off, then still output to IFTTT that the virtual switch has been set to turned off.

Hope it makes sense?
Maybe I'm missing something and there is a better way to manage this situation?

If the Smartlife and EWeLink support it, setup another IFTTT applet that syncs changes back to the HE virtual switch. This is what I do to keep a virtual lock in HE, in sync with my August Lock when manual changes are made to the lock/unlock state.


Brilliant. Duh! Why didn't I think of that!
Much appreciated.

1 Like

Just be sure when you're testing, you give it time to update. In normal use, the slight delay won't make a difference. But if you don't give it time to sync, which will vary from service to service, then it will look like it's not working and you can get out of sync if you flip back and forth too quickly.

There's no feedback to IFTTT that any of its actions have happened obviously. It just fires off the applet and make the change to virtual the device to HE. The applet updating status can only be confirmed working by you visually comparing the physical state to the status of the virtual switch.

1 Like

Understood. Thanks.

1 Like