I'm working on a rule to set my Nest thermostat to Eco when doors/windows are open and the restore the previous state when everything is closed. I created a custom command that lets Rule Machine switch the thermostat to Eco but I'm not sure how to capture the current thermostat state. I can toggle it back to Auto but if the thermostat was in Eco mode already I can't see how to test against that custom thermostatMode value.
Are you using Nest Integration (deprecated) or NST Manager?
There are a couple of things
-
the HE standard definition (device capability) for thermostat and thermostatMode does not include "eco" (ST does include this, I have reported this to HE folks)
-
if using NST manager, there is an attribute on the thermostats "nestThermostatMode" that would be set to "eco" if the thermostat is in eco. ("thermostatMode" attribute is also set this way, but if you cannot see because of the definition problem try nestThermostatMode)
I am using NST Manager and I did see the nestThermostatMode attribute. I'm not seeing how I can read an arbitrary attribute in Rules Machine though. The attributes available for condition/capture seem to be tied to the pre-defined device types.
I believe RM supports custom attributes. This should work with nestThermostatMode
Any chance you could share a screenshot of where in the rules I can create a condition on a custom attribute I'm not having any luck finding it.
Thanks!
Look for an app called WATO. This will allow you to set a switch based on this attribute.
Thanks that should do it in a round-about way, I think I can use WATO to disable the "set to eco" rule when the thermostat is already set to eco.
I was just looking into how to do something similar now that I found out eco mode can be sent as a custom command. I ended up creating a Global Variable called last-mode as a string, then set the variable from Device Attributes of the Nest Thermostat using previousthermostatMode. Then I can use %last-mode% as a parameter for the custom command setThermostatMode to bring it out of Eco mode. Works like a charm!