- Code: Select all
import datetime
SchoolHolidayExpiration = indigo.variables[1189488181].value
currentDate = indigo.server.getTime().date()
indigo.server.log(SchoolHolidayExpiration)
indigo.server.log(currentDate)
if currentDate <= SchoolHolidayExpiration:
indigo.variable.updateValue(815180286, value=Yes)
else:
indigo.variable.updateValue(815180286, value=No)
The first error I get is:
Script Error embedded script: Python argument types in
ServerInfo.log(datetime.date)
did not match C++ signature:
log(CCString message, CCString type='', bool isError=False)
Script Error Exception Traceback (most recent call shown last):
embedded script, line 7, at top level
ArgumentError: Python argument types in
ServerInfo.log(datetime.date)
did not match C++ signature:
log(CCString message, CCString type='', bool isError=False)
and if I take out the
, then I simply getindigo.server.log(currentDate)
TypeError: can't compare datetime.date to unicode
Any ideas?