Hi guys,
Simple question here.
I have two thermostats. How can I create a condition to enable one switch if one of the thermostat is above a X temperature and the second thermostat is above Y themperature?
Thanks in advance.
Turning on switch based on two thermostats
Moderator: leecollings
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Turning on switch based on two thermostats
You probably need scripting to do that in domoticz.
Using dzVents it could look like below example
Code: Select all
return
{
on =
{
devices =
{
'thermostat1', -- change your thermostat name
'thermostat2', -- change your thermostat name
}
},
logging =
{
level = domoticz.LOG_DEBUG, -- set to domoticz.LOG_ERROR when all ok
marker = 'multiple thermostats',
},
execute = function(dz)
local thermostat1 = dz.devices('thermostat1') -- change your thermostat name
local thermostat2 = dz.devices('thermostat2') -- change your thermostat name
local mySwitch = dz.devices('mySwitch') -- change your switch name
local xTemperature = 10
local yTemperature = 20
if thermostat1.setPoint > xTemperature and thermostat2.setPoint > yTemperature then
mySwitch.switchOn().checkFirst()
end
end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Who is online
Users browsing this forum: No registered users and 0 guests