I have a heat pump from which I receive many measurement values via MQTT to Domoticz, including device (336) "5C54 Compr. consump. tot" and device (339) "5C57 Aux consumption tot".
Now, I want to add these two MQTT devices (336) 5C54 + (339) 5C57 and display the total sum in device TotalActual (342) as it looks in red ring 1 and 2 in device (336) and (339).
Everything in the script works but I do not see the result in kWh in device TotalActual (342) at yellow ring 4 as it appears in device (339) at red ring 2 and (336) at red ring 1 where the sum for today is displayed on row two.
Additionally, I can only see Watt value in TotalActual (342) at yellow ring 3, but no value is displayed in the graphs for device TotalActual (342). I want to see value in device TotalActual (342) as it looks in device (336) 5C54 and device (339) 5C57.
I would be grateful if someone could help me and show what I do wrong in the script.
Thank you for all help!

Best regard's
McLund
Code: Select all
return {
on = {
timer = { 'every 5 minutes' }
},
execute = function(domoticz, item)
local Husdata_5C54 = domoticz.devices(336).WhToday -- = Husdata "5C54 Compr. consump. tot" via MQTT - use WhToday?
local Husdata_5C57 = domoticz.devices(339).WhToday -- = Husdata "5C57 Aux consumption tot" via MQTT - use WhToday?
local TotalActual = Husdata_5C54 + Husdata_5C57
domoticz.devices(342).updateElectricity(TotalActual)
end
}