smartthings-users / device-type.nest

Device Type for Nest Thermostat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

auto-change to away status

SmartCarrion opened this issue · comments

this should include smartapp code to auto set 'away' status based on presence

The device supports changing modes that can be triggered by apps. This is the example I use: https://github.com/imbrianj/change_nest_mode

thanks for replying, i was just writing up some code and was going to send
it along to you :-)

On Fri, Jun 6, 2014 at 5:24 PM, Brian notifications@github.com wrote:

The device supports changing modes that can be triggered by apps. This is
the example I use: https://github.com/imbrianj/change_nest_mode


Reply to this email directly or view it on GitHub
#10 (comment)
.

Sorry, the last comment was made on my mobile. I'll try to give more detail now that I'm at a computer:

The device type describes how the device commands should be executed. It should not specify conditions in which those commands should be executed. You should use an app as I'd cited above to issue the specific command to the device under a certain condition (installed for "Away" mode to mark the thermostat as "Away" or "Present" when you are "Home"). Doing so, you decouple the device from specific behaviors, eliminating complexity and keeping each code component small, modular and specialized. For what it's worth, I use this app to trigger Home / Away / Night modes: https://github.com/imbrianj/nobody_home/blob/master/nobody_home.groovy - and the "Change Nest Mode" app is installed for both "Home" and "Away" to pass those commands to this device type.

Hope this helps. Suggest this issue be marked resolved.

Just in case you want a SmartApp that works both ways instead of using the "Change Nest Mode" app, you can try this:

https://github.com/dvanwinkle/smartapp.Modify-Nest-Presence-with-Hub-Status