I have this script and it works so far, no errors in the log.
I want to combine the power of three sensors and display that in a dummy sensor (kWh) So far I can see in the log the combined/totalled power.
The sensor 'Totaal Kwh Growatt' is updating but there is no value displayed. If I look in the device tab at this sensor then I do see under data the values changing.
What am I doing wrong here?
Code: Select all
return
{
on =
{
devices =
{
499, 503, 507
}
},
logging =
{
level = domoticz.LOG_DEBUG,
marker = 'totaal vermogen',
},
execute = function(dz)
local L1 = dz.devices(499).actualWatt
local L2 = dz.devices(503).actualWatt
local L3 = dz.devices(507).actualWatt
local combinedUsage = dz.devices('Totaal Kwh Growatt')
local totpower = ( L1 + L2 + L3 )
combinedUsage.update(totpower, WhActual)
dz.log('# totaal vermogen = '..totpower..'')
end
}