Take number ingredient from IFTTT to set time condition

Hi all,

I currently use two GE WiFI window air conditioners, and I can set specific schedules within its app, but I want more flexibility. I’m hoping to use Google Assistant, IFTTT, and Apilio to make this work…

I want the initial trigger to be a Google Assistant phrase with number and text ingredients

"Hey Google, turn on the Living Room AC at # $

The action would be to send that numeric value ingredient to Apilio, probably to change a numeric variable to 4, and send the text phrase ingredient to a string variable.

I’m then wondering how I can take this numeric variable and string variable to set a time condition for 4:00pm…

Is this possible? Is there a better way to do this?

1 Like

I tried using IFTTT Date and Time to set a numeric variable in Apilio…If at every hour at 00 minutes, then update numeric variable “currentTime” to “CheckTime” but alas, the variable was always given a value of 0…

1 Like

I’m thinking I should try to avoid specific times (“at # pm”), and instead go for in a certain amount of time ("in # hours). I could then use a logic block to decrease that numeric variable over time…

Would be great if there was some way to schedule a time via numerical value, and compare that scheduled time to the current time though…

1 Like

Hi @m0rf3us ,
this is not supported out of the box, but with a bit of creativity you can solve it.
I would put the ingredient into a numeric variable (note: it would have to be 24h format, so 16 instead of 4pm).
Then have a second variable that contains the current hour of the day (either set this by increasing from 00:00 every our through an IFTTT applet or an Apilio Logicblock that increases it).

Then you can create a condition “if number catches by Google is higher than current hour of the day” => switch on AC.

2 Likes

Very crafty! :slight_smile: Interesting solution, Philipp. Thanks

1 Like