Feature: Publish YieldTotal, YieldDay and Power of all inverters to Home Assistant

This commit is contained in:
Thomas Basler 2024-09-24 22:16:17 +02:00
parent 01e43777d2
commit 2fb026074a

View File

@ -67,6 +67,10 @@ void MqttHandleHassClass::publishConfig()
publishDtuSensor("Largest Free Heap Block", "dtu/heap/maxalloc", "Bytes", "mdi:memory", "", "diagnostic"); publishDtuSensor("Largest Free Heap Block", "dtu/heap/maxalloc", "Bytes", "mdi:memory", "", "diagnostic");
publishDtuSensor("Lifetime Minimum Free Heap", "dtu/heap/minfree", "Bytes", "mdi:memory", "", "diagnostic"); publishDtuSensor("Lifetime Minimum Free Heap", "dtu/heap/minfree", "Bytes", "mdi:memory", "", "diagnostic");
publishDtuSensor("Yield Total", "ac/yieldtotal", "kWh", "", "energy", "");
publishDtuSensor("Yield Day", "ac/yieldday", "Wh", "", "energy", "");
publishDtuSensor("AC Power", "ac/power", "W", "", "power", "");
publishDtuBinarySensor("Status", config.Mqtt.Lwt.Topic, config.Mqtt.Lwt.Value_Online, config.Mqtt.Lwt.Value_Offline, "connectivity", "diagnostic"); publishDtuBinarySensor("Status", config.Mqtt.Lwt.Topic, config.Mqtt.Lwt.Value_Online, config.Mqtt.Lwt.Value_Offline, "connectivity", "diagnostic");
// Loop all inverters // Loop all inverters