touch hello_world.py
DaveL17 wrote:Downloading Pythonista now. Looking forward to seeing what this puppy can do.
siclark wrote:So, got all excited at being able to set custom timers by using Siri to change a variable value to say 30 or 55 as the number of minutes for a timer. However I stumbled at the indigo implementation. Is it possible to have a timer reference a variable for the time to run? I've tried doing %%v:varid%% but it seems to only want a
tId = "com.perceptiveautomation.indigoplugin.timersandpesters"
timerPlugin = indigo.server.getPlugin(tId)
if timerPlugin.isEnabled():
timerPlugin.executeAction("setTimerStartValue", deviceId=1604521627, props={'amount':'30', 'amountType':'minutes'})
BrianAz wrote:is this on the radar for the Indigo iOS app?
mundmc wrote:siclark wrote:You have to have a timer device, but you can modify the time:
- Code: Select all
tId = "com.perceptiveautomation.indigoplugin.timersandpesters"
timerPlugin = indigo.server.getPlugin(tId)
if timerPlugin.isEnabled():
timerPlugin.executeAction("setTimerStartValue", deviceId=1604521627, props={'amount':'30', 'amountType':'minutes'})
siclark wrote:mundmc wrote:siclark wrote:You have to have a timer device, but you can modify the time:
- Code: Select all
tId = "com.perceptiveautomation.indigoplugin.timersandpesters"
timerPlugin = indigo.server.getPlugin(tId)
if timerPlugin.isEnabled():
timerPlugin.executeAction("setTimerStartValue", deviceId=1604521627, props={'amount':'30', 'amountType':'minutes'})
Cheers. I gave this a go but can't replace the 30 with a variable. Shows up my lack of python
Trying to do this, but get an error
napMin = (indigo.variables[1773146389]) # "NapTime"
timerPlugin.executeAction("setTimerStartValue", deviceId=36400889, props={'amount': newMin), 'amountType': 'minutes'})
Users browsing this forum: No registered users and 5 guests