Action group to set cool or heat set point

mikeL
Posts: 46
Joined: Fri Apr 30, 2010 4:25 pm
Location: Gatineau, QC

Action group to set cool or heat set point

Post by mikeL »

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
Attachments
action group.png
action group.png (30.13 KiB) Viewed 2225 times
Chameleon
Posts: 611
Joined: Sat Oct 04, 2014 9:50 am

Re: Action group to set cool or heat set point

Post by Chameleon »

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
Let me think about how that could be done easily Mike...
Chameleon
Posts: 611
Joined: Sat Oct 04, 2014 9:50 am

Re: Action group to set cool or heat set point

Post by Chameleon »

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
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:
NEST Indigo Variable Set point Action Manager
NEST Indigo Variable Set point Action Manager
NEST Indigo Variable Setpoint.png (80.1 KiB) Viewed 2173 times
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 :D

Regards

Mike
mikeL
Posts: 46
Joined: Fri Apr 30, 2010 4:25 pm
Location: Gatineau, QC

Re: Action group to set cool or heat set point

Post by mikeL »

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)
Or, in AppleScript

Code: Select all

set coolSet to value of variable "scheduled_temperature"
set cool setpoint of device "Main Thermostat" to coolSet
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
mikeL
Posts: 46
Joined: Fri Apr 30, 2010 4:25 pm
Location: Gatineau, QC

Re: Action group to set cool or heat set point

Post by mikeL »

Mike
I've thought about what you're saying and I just want to confirm the use case.
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.
Cheers,
Mike
Chameleon
Posts: 611
Joined: Sat Oct 04, 2014 9:50 am

Re: Action group to set cool or heat set point

Post by Chameleon »

mikeL wrote:Mike
I've thought about what you're saying and I just want to confirm the use case.
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.
Cheers,
Mike
Cool code... You learn something everyday. Just goes to show that Matt and Jay have got some real power in the IOM.

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 :D

Mike
Post Reply

Return to “NEST Home”