I created a small iOS Shortcut and a related Python script which make following:
- ask you (by voice) to set up an alarm clock
- this alarm will be set in iOS and using SSH server also in Indigo
In my Indigo setup I have an "alarm clock" schedule which does some basic stuffs, and then a "good morning" action which makes other things; the second one is called manually (by voice), the first one is a schedule configured which takes the "alarm clock" variable as schedule time
iOS Shortcut: https://www.icloud.com/shortcuts/e2342c ... ce7a130369
Python Script:
Code: Select all
alarm_clock = indigo.variables[469044268].value # "sveglia"
alarm_cleaned = "0" + alarm_clock.split()[0]
indigo.variable.updateValue(469044268, value=alarm_cleaned)
Therefore I have to say "set an alarm an 6 in the morning"; then of course the variable will not contain only the time, but also some other words; the small script will take just the number and will insert a leading zero for Indigo so that it recognizes as time for the schedule.
Marco