Is it possible to create a scene that changes the temperature relative to the current temperature rather than to an absolute temperature? In other words, can I create a scene to simply turn up the heat by 2 degrees regardless of current setting?
Yes, it can be done using LUA code.
local lul_args = {}
local currentSetting=luup.variable_get("urn:upnp-org:serviceId:TemperatureSetpoint1_Heat","CurrentSetpoint",61)
lul_args["NewCurrentSetpoint"]=tonumber(currentSetting)+1
luup.call_action("urn:upnp-org:serviceId:TemperatureSetpoint1_Heat","SetCurrentSetpoint",lul_args,61)
You need to replace the “61” parameter with your thermostat’s ZWave device number.
[quote=“aa6vh, post:2, topic:185870”]Yes, it can be done using LUA code.
local lul_args = {}
local currentSetting=luup.variable_get("urn:upnp-org:serviceId:TemperatureSetpoint1_Heat","CurrentSetpoint",61)
lul_args["NewCurrentSetpoint"]=tonumber(currentSetting)+1
luup.call_action("urn:upnp-org:serviceId:TemperatureSetpoint1_Heat","SetCurrentSetpoint",lul_args,61)
You need to replace the “61” parameter with your thermostat’s ZWave device number.[/quote]
Awesome, thanks! What would I need to change “urn:upnp-org:serviceId:TemperatureSetpoint1_Heat” to in order to create one for AC?
Yes!
Have not tried it but it should be: TemperatureSetpoint1_Cool
okay following up on this - is there a way to use luup code for a delay? what i’m trying to do - when my girlfriend wakes up, turn up the heat by 2 degrees and after 30 minutes, turn it back down 2 degrees. is this possible in one scene or do i need to create 2 scenes and put logic into the second one to run 20 minutes after the first?
It is certainly possible. There is an explanation and example code in Delayed Actions.
This is also a good time to mention that this type of logic is easily, and more reliably, handled using PLEG.