I have the following sensor (EcoDevices) that can have 2 values (General Alert sensor ->
1 -> Heures Creuses
2 -> Heures Pleines
I don't know how to make simple actions about this sensor in dzVents (seems I am one of the strange people who likes to know how to do that).
Here is my code... If you can help me a bit
Code: Select all
return {
on = {
devices = {
'EDF Tarif en cours'
}
},
execute = function(domoticz, tarif)
domoticz.notify('Tarifs ' .. tarif.value, domoticz.HIGH)
if (tarif.value == '(1) Heures Creuses') then
-- Heure Creuses
domoticz.devices('SW HC').switchOn()
else
-- Off
domoticz.devices('SW HC').switchOff()
end
end
}