Actually i'm using a door switch to shut my heating if the door is open and the outside temperatur is less than 15° C.
Code: Select all
return {
on = {
devices = {
'Tuer Wohnzimmer',
'Zigbee Terrassentuer'
}
},
execute = function(domoticz, device)
local WZHeat = domoticz.devices('WZ Heat')
local WZThermostat = domoticz.devices('WZ Thermostat');
local OAT = domoticz.devices('THB Darksky');
if OAT.temperature < 15 then
if device.state == 'Open' then
domoticz.log(device.name .." is now Open; setting Mode to Off")
WZThermostat.updateMode('Off')
-- WZHeat.updateSetPoint(16)
elseif device.state == 'Closed' then
domoticz.log(device.name .." is now Closed; setting Mode to Heat " )
WZThermostat.updateMode('Heat')
end
end
end
}
Thanks for any idea