- Code: Select all
dev = indigo.devices[1596829398] #radio alarm clock
time = (dev.states["startTime"])
indigo.variable.updateValue(1352903259, str(time))
but it puts in the full date time string.
thanks!
dev = indigo.devices[1596829398] #radio alarm clock
time = (dev.states["startTime"])
indigo.variable.updateValue(1352903259, str(time))
dev = indigo.devices[1596829398] #radio alarm clock
t = (dev.states["startTime"])
indigo.variable.updateValue(1352903259, str(t[11:16]))
using terms from application "IndigoServer"
tell application "IndigoServer"
set HomeReadout to value of variable "Home" as string
set value of variable "HomeReadout" to (characters 17 through -1 of HomeReadout) as text
end tell
end using terms from
HomeReadout = indigo.variables[306104832].value #HomeReadout
Home = indigo.variables[1596654921].value #Home
indigo.variable.updateValue(HomeReadout, str(Home[17:-1]))
Script Error embedded script: No module named variable_watcher
Script Error Exception Traceback (most recent call shown last):
embedded script, line 1, at top level
ImportError: No module named variable_watcher
Script Error embedded script: invalid syntax
Script Error around line 31 - "pass"
HomeReadout = indigo.variables[306104832].value #HomeReadout
Home = indigo.variables[1596654921].value #Home
indigo.variable.updateValue(HomeReadout, str(Home[17:-1]))
indigo.variable.updateValue(306104832, str(Home[17:-1]))
EPS - Alarm Clock Error Error in plugin execution ExecuteAction:
Traceback (most recent call last):
File "plugin.py", line 114, in deviceActions
KeyError: key not found in database
hamw wrote:I don't think you can turn off all days. It's not just Wednesday, it's the last one you try to turn off.
EPS - Alarm Clock Error Control page attempted to turn off every day of the week, this isn't possible. It's easier to just turn off the alarm!
from datetime import datetime
alarmClock = indigo.devices[402185762]
newTime = "05:30" # replace later with a variable or something
oldDelta = alarmClock.durationMinutes
newDelta = newTime - alarmClock.startTime # will need to convert newTime to a datetime object
diference = newDelta - oldDelta
if diference > 0: # add time to duration
pluginId = "com.eps.indigoplugin.alarm-clock"
alarmClockPlugin = indigo.server.getPlugin(pluginId)
if alarmClockPlugin.isEnabled():
alarmClockPlugin.executeAction("increaseDuration", deviceId=402185762, props={'stepIncrement':diference})
else: # difference is a negative number, so subtract from current duration
pluginId = "com.eps.indigoplugin.alarm-clock"
alarmClockPlugin = indigo.server.getPlugin(pluginId)
if alarmClockPlugin.isEnabled():
alarmClockPlugin.executeAction("decreaseDuration", deviceId=402185762, props={'stepIncrement':diference})
Users browsing this forum: No registered users and 3 guests