IFTTT Number to Time


#1

Hi Team! Need some help with a project.

  1. I’m trying to figure out how to convert a number that was passed from IFTTT into a webcore variable, into a time variable. I want to be able to tell Google Home to set a time, then pass that time to IFTTT, which passes it to webcore. Then webcore would convert it to a time variable and store it globally for use with several pistons.

I have accomplished the following:

  • Tell Google home a number
  • IFTTT takes that number and passes it to a webcore piston
  • !!! Can’t figure out how to convert that number into usable time variable

Any help would be appreciated.


#2

this is code from a IFTTT call I made, switchval was what was passed

edit : never mind, see you got var, just can’t convert to a time var

some time functions, not sure what format your time comes in as

https://wiki.webcore.co/Functions#Time_2


#3

Try wrapping the incoming number in time() function

Also please follow the template in order to get faster help.


#4

Just wanted to do similar function to set my wake up time for lights automation, did a little bit research on the forum and took inspiration from @John68, finally I came with this:


And in ifttt:

First I tired with saying numbers in ifttt, but it turned out that ifttt can’t recognize time numbers like 7:15. So I switched to phrases and parsed the string inside the piston. Finally setting to my global variable wakeUpTime.


#5

Thanks this was great. Was wondering how to do this. Should be a turial for this exact thing.