How do I toggling devices with IFTTT

Hi,

I am trying to add a remote light switch to control the lighting in my room, unfortunately it is an aqara switch doesnt support by hubitat, I am trying to use IFTTT to do that. But I only find the option to either turn a device on or off, no toggling there. Which mean I need 2 buttons to do the job but I only got 1.

I wonder if anyone know how to do that? Thanks in advance

Welcome. If it were me, I'd replace the switch with something that can be controlled by Hubitat directly. IFTTT still uses the internet to control the device - not ideal.

2 Likes

Sounds like you have a switch that is integrated to IFTTT and a button device that is on Hubitat?

Create a virtual switch in Hubitat to represent your lights. Create a Rule Machine/Button controller rule for the button press and have it toggle the virtual switch. Share the virtual switch to IFTTT. Create an applet in IFTTT to mirror the on/off state of the virtual switch. Not sure how it works in IFTTT exactly, might need two applets one for on and one for off.

What I have is opposite, a light with hubitat, and a aqara switch that doesnt work with hubitat but ifttt.

But the hubitat ifttt integration only have on / off no toggle ;(

Can you create a virtual button in Hubitat and share that to IFTTT? Then in IFTTT do an applet when your real button is pressed, then press the virtual button.

Then in Hubitat you can create a button controller rule to toggle the light based on the virtual button being pressed.

Unfortunately the IFTTT Hubitat applet doesnt provide a press action

Only
Turn on
Turn off
Lock
Unlock
Open
Close
Dim
Change mode

Ok, backup plan.
Create a virtual switch in Hubitat. It comes with a default auto-off setting, set that to the lowest setting it has. Share to IFTTT

Then in IFTTT, create applet when button is pushed to turn on that virtual switch.

In Hubitat create a Rule Manager rule, when virtual switch turns on, toggle the lights.

Sounds like a plan, I will try tomorrow when I can play around with the light

It works!!! Thank you very much, learnt a trick

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.