Hi Mike
Your plugin allows the creation of an action group to set the cool set point or heat set point to a specific numerical value, 23.5 degrees in the example below. So, to schedule different set points at specific times of the day one needs to create a series of action groups — one action group for each specific temperature — then invoke the appropriate action group when required.
Alternatively, can a single action group be created to set the set point from the value of a variable? That is, can I use an embedded Python script in an action group to set the set point? If that's possible, would you kindly share some Python code to do this. If it's not yet possible, would you consider this as an enhancement request. Thanks.
Cheers,
Mike
Action group to set cool or heat set point
Action group to set cool or heat set point
- Attachments
-
- action group.png (30.13 KiB) Viewed 2227 times
Re: Action group to set cool or heat set point
Let me think about how that could be done easily Mike...mikeL wrote:Hi Mike
Your plugin allows the creation of an action group to set the cool set point or heat set point to a specific numerical value, 23.5 degrees in the example below. So, to schedule different set points at specific times of the day one needs to create a series of action groups — one action group for each specific temperature — then invoke the appropriate action group when required.
Alternatively, can a single action group be created to set the set point from the value of a variable? That is, can I use an embedded Python script in an action group to set the set point? If that's possible, would you kindly share some Python code to do this. If it's not yet possible, would you consider this as an enhancement request. Thanks.
Cheers,
Mike
Re: Action group to set cool or heat set point
MikemikeL wrote:Hi Mike
Your plugin allows the creation of an action group to set the cool set point or heat set point to a specific numerical value, 23.5 degrees in the example below. So, to schedule different set points at specific times of the day one needs to create a series of action groups — one action group for each specific temperature — then invoke the appropriate action group when required.
Alternatively, can a single action group be created to set the set point from the value of a variable? That is, can I use an embedded Python script in an action group to set the set point? If that's possible, would you kindly share some Python code to do this. If it's not yet possible, would you consider this as an enhancement request. Thanks.
Cheers,
Mike
I've thought about what you're saying and I just want to confirm the use case.
This is what I think you're asking for:
If so I'll update NEST Home over the next day or so and let you test it before I release it to a more general population.
It's a very good idea though. I hate having so many action groups in my list and this would be a great space saver
Regards
Mike
Re: Action group to set cool or heat set point
Mike
It turns out that the ThermostatDevice class of the Indigo IOM provides a means to do this and it works because the Nest Thermostat Module is a ThermostatDevice object.
So, in Python
Or, in AppleScript
I created an action to execute that embedded code. My temperature scheduler sets the scheduled_temperature variable then calls the action. This seems to work perfectly and is cleaner than calling one of several actions to set a specific temperature value.
Cheers,
Mike
It turns out that the ThermostatDevice class of the Indigo IOM provides a means to do this and it works because the Nest Thermostat Module is a ThermostatDevice object.
So, in Python
Code: Select all
var = indigo.variables[576243972] # "scheduled_temperature"
coolSet = var.getValue(float)
indigo.thermostat.setCoolSetpoint("Main Thermostat", value=coolSet)
Code: Select all
set coolSet to value of variable "scheduled_temperature"
set cool setpoint of device "Main Thermostat" to coolSet
Cheers,
Mike
Re: Action group to set cool or heat set point
Mike
Cheers,
Mike
Yes, this is exactly the use case I have in mind. And, as you can see from my previous reply, there's a simple way to do this. Thanks, once again, for your extremely useful plugin.I've thought about what you're saying and I just want to confirm the use case.
Cheers,
Mike
Re: Action group to set cool or heat set point
Cool code... You learn something everyday. Just goes to show that Matt and Jay have got some real power in the IOM.mikeL wrote:MikeYes, this is exactly the use case I have in mind. And, as you can see from my previous reply, there's a simple way to do this. Thanks, once again, for your extremely useful plugin.I've thought about what you're saying and I just want to confirm the use case.
Cheers,
Mike
My only suggestion would be to replace the name of the thermostat with the device Id because that never changes but the name might. You could also set up a device variable in the same way so that the embedded code could select a device and the set point.
Glad the plugin works for you
Mike