Get value from sensor Sun Power
Posted: Friday 17 July 2020 11:09
Hello, i'm new in this forum.
I am can't this script not working. Please help
My device:
Buienradar Son 00000201 1 Sun Power General Custom Sensor 435 watt/m2
My script
What is wrong in the script.
Thanks in advance
I am can't this script not working. Please help
My device:
Buienradar Son 00000201 1 Sun Power General Custom Sensor 435 watt/m2
My script
Code: Select all
return {
on = {
timer = { 'every minute' },
sensor = { 'Sun Power'}
},
execute = function(domoticz, sensor)
if (domoticz.sensor('Sun Power').kWh > 220) then
domoticz.devices('Keuken').switchOn()
domoticz.log('Hey! I am ON sunpower!')
else
domoticz.devices('Naast tv').switchOff()
domoticz.log('Hey! I am off sunpower!')
end
end
}
Thanks in advance