Convert script to Set Thermostat Heat and Cool Setpoints

Posted on
Tue Aug 27, 2019 1:30 pm
wideglidejrp offline
User avatar
Posts: 555
Joined: Jan 15, 2012
Location: Danbury, CT

Convert script to Set Thermostat Heat and Cool Setpoints

Following is part of a script I want to use to set thermostat heat and cool setpoints.

Code: Select all
indigo.thermostat.setHeatSetpoint(976148194, indigo.variables[1461023788].value)
indigo.thermostat.setCoolSetpoint(976148194, indigo.variables[780720399].value)

The error messages are...

Script Error embedded script: Python argument types in
ThermostatDeviceCmds.setHeatSetpoint(ThermostatDeviceCmds, int, unicode)
did not match C++ signature:
setHeatSetpoint(CDeviceThermostat::_ThermostatDeviceCmds {lvalue}, boost::python::api::object device, double value, bool suppressLogging=False, bool updateStatesOnly=False)
Script Error Exception Traceback (most recent call shown last):

embedded script, line 7, at top level
ArgumentError: Python argument types in
ThermostatDeviceCmds.setHeatSetpoint(ThermostatDeviceCmds, int, unicode)
did not match C++ signature:
setHeatSetpoint(CDeviceThermostat::_ThermostatDeviceCmds {lvalue}, boost::python::api::object device, double value, bool suppressLogging=False, bool updateStatesOnly=False)




John R Patrick
Author of
Home Attitude

Posted on
Tue Aug 27, 2019 2:06 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Convert script to Set Thermostat Heat and Cool Setpoints

.value returns unicode. You need int (or maybe float).

Code: Select all
indigo.thermostat.setHeatSetpoint(976148194, indigo.variables[1461023788].getValue(int))
indigo.thermostat.setCoolSetpoint(976148194, indigo.variables[780720399].getValue(int))

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue Aug 27, 2019 3:59 pm
wideglidejrp offline
User avatar
Posts: 555
Joined: Jan 15, 2012
Location: Danbury, CT

Re: Convert script to Set Thermostat Heat and Cool Setpoints

.getValue(int) worked perfectly. Thank you.

John R Patrick
Author of
Home Attitude

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests