Home Assistant to IFTTT to Smart Life

I was able use a light template to add my Living Room Light (controlled by Smart Life) in Home Assistant. Then I set up webhooks in IFTTT and created an automation in HA to turn on the lights and a separate one to turn off the light thru HA/IFTTT/Smart Life when I command the light on the HA Overview screen. It works just fine.

It took a couple days to figure it out since I am new to HA. Seems like a lot of trouble to go through just to automate a light when Smart Life was doing that in a basic way. I basically was going through the process to see if/how it worked. Now I know. I still don’t like the fact that you are broadcasting out to the internet for this function (IFTTT) and hope to see the Smart Life Component added in HA that will hopefully allow us to connect directly at the wifi level to the local devices.

1 Like

Can you share how you did that ? I want to control a CNCT intelliplug in HA with IFTT but I did not find how to do it …

Get a IFTTT key and then in configuration.yaml…

ifttt:

key: enteryourkeyhere

Then…

light:

- platform: template
  lights:
    bedroom_tv:
      friendly_name: "Bedroom TV"
      turn_on:
        service: ifttt.trigger
        data:
          event: light.bedroom_tv_on
          value1: 'on'
      turn_off:
        service: ifttt.trigger
        data:
          event: light.bedroom_tv_off
          value1: 'on'

Then go into IFTTT/My Applets/New Applet.
For the This entry, select Webhooks, Select Receive a web request.Enter the event name: light.bedroom_tv_on for the trigger.
For the action, choose action service Smart Life, choose Turn on, then select the Smart life component you want to turn on (in my case it was Bedroom TV) but yours should be in the drop down selection if you entered all the IFTTT api key info in configuration. yaml correctly.

After you select the name for your Smart Life device, then click finish. You can now test the on function. Now you have to do the same thing for the off function with a different applet. Just repeat the process for the off function. Mine above is light.bedroom_tv_off. Remember to enter the value “on” for the off command as well. Kind of confusing but it works. Then test.

Good luck!

1 Like

Enter three “back ticks” (which is generally the key in the upper left hand corner of your keyboard, to the left of the numeral 1 key, just below the ESC key), then hit Enter/Return. Then enter the code, then Enter/Return, then three more back-ticks. The link at the top of the page (please use code blocks and syntax highlighting) has more instructions if you follow it.

Thanks, I will give it a try next time.

You can go back and edit your previous post and just add a line with three back-ticks before and another line with three back-ticks after your code block. That will make it easier when people come later to this topic to see how you got it working. :slight_smile:

I think I got it. Thanks pnbruckner! If all else fails, I should read the darn instructions!

1 Like

Note: Not all bulbs that use Smart life app has IFTT support. If your app shows it has support for IFTT for the devices you installed the above method work. But there are many manufacturers with items that use smartlife app that only support Google Home and Alaexa and not IFTT. If you have such devices then you will not see list of items in IFTT website- Options unavailable. For those we need to figure out another method. For all devices including Ewlink items that are IFTT enabled by default the method mentioned here could be used

I’ll watch out for that.

What about the template parameter in template switch? It is required per to the official document.