DEKLARÁCIE (Podmienky/Spúšťače)
{
conditions = { {
id = 30,
isTrigger = true,
operator = "!=",
property = "heatingThermostatSetpoint",
type = "device",
value = 5
} },
operator = "all"
}
ACTIONS (Akcie)
local fromID = 30 -- Hlavny termostat alebo radiatorová hlavica
local toID = {21,27} -- ďalšie radiatorove hlavice
local temp_wish = fibaro.getValue(fromID, "heatingThermostatSetpoint")
for i=1,#toID do
local name = fibaro.getName(toID[i])
if ( fibaro.getValue(toID[i], "heatingThermostatSetpoint") ~= fibaro.getValue(fromID,"heatingThermostatSetpoint") ) then
fibaro.call(toID[i], "setHeatingThermostatSetpoint", temp_wish)
end
end
fibaro.debug("","Teploty boli synchronizovane")