Thank you, looks awesome!
Now if you'll excuse me, I'm off to "program" the "dad-Thermostat", where the automation gradually lowers the target temperature to a sensible level after my wife turns it to 28°C because she doesn't like the boost button on it.
Best Regards,
rws
[edit]
That app is awesome!
it took me less than an hours to implement the dad mode thermostat. Now every time the measured temperature gets reported, the app checks if the target temperature is set to a sensible level. For that I added a virtual dummy device where I can set the lower level of the dad mode. It only can do integer numbers but that's a compromise I am willing to make.
Code: Select all
//Get triggered by temp. sensor updates of thermostat
###ZWayVDev_zway_39-0-49-1
var sensorValue = vdev("ZWayVDev_zway_39-0-49-1").value()
var targetValue = vdev("ZWayVDev_zway_39-0-67-1").value()
var targetDadValue = vdev("DummyDevice_155").value()
if (targetValue > targetDadValue) {
vdev("ZWayVDev_zway_39-0-67-1").set(targetValue - 0.5)
}
Now the target temperature gets lowered with each temp update by 0.5° until it has reached the dad level. The script gets triggered whenever the room temperature changes, so it's not that obvious to the unsuspecting eye.
Seriously awesome work, this makes ZWay so much more attractive! Much appreciated!
Best Regards,
rws
[edit]
Working out the details here. devices can be used as variables as well.
Code: Select all
//Get triggered by temp. sensor updates of thermostat
###ZWayVDev_zway_50-0-49-1
var thermostat_sensor_device = vdev("ZWayVDev_zway_50-0-49-1")
var thermostat_target_temperature_device = vdev("ZWayVDev_zway_50-0-67-1")
var dad_target_dummydevice = vdev("DummyDevice_157")
//Get Sensor Value
var sensorValue = thermostat_sensor_device.value()
var targetValue = thermostat_target_temperature_device.value()
var targetDadValue = dad_target_dummydevice.value()
//Reduce Target Temperature according to Dad Mode
if (targetValue > targetDadValue) {
thermostat_target_temperature_device.set(targetValue - 0.5)
}
I have some more questions:
Is there a way to send a message to the log from the easy scripting app?
Is there a way to launch a system command, e.g. a shell script?
Greetings,
rws