From 071cf1ab894afcf0a432992b07ee8f26a391f88a Mon Sep 17 00:00:00 2001 From: kaepse <31590145+kaepse@users.noreply.github.com> Date: Fri, 15 Oct 2021 23:34:37 +0200 Subject: [PATCH 1/2] Extended global sensors (regarding house) added global sensors for house: - added sensor for consumption - added sensor for imported energy - added sensor for exported energy - added sensor for produced energy --- custom_components/openwbmqtt/const.py | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/custom_components/openwbmqtt/const.py b/custom_components/openwbmqtt/const.py index 618dc82..80b68e9 100644 --- a/custom_components/openwbmqtt/const.py +++ b/custom_components/openwbmqtt/const.py @@ -21,6 +21,7 @@ ELECTRIC_CURRENT_AMPERE, ELECTRIC_POTENTIAL_VOLT, ENERGY_KILO_WATT_HOUR, + ENERGY_WATT_HOUR, LENGTH_KILOMETERS, PERCENTAGE, POWER_WATT, @@ -69,6 +70,34 @@ class openwbSensorEntityDescription(SensorEntityDescription): 4: "Standby", }, ), + openwbSensorEntityDescription( + key="global/WHouseConsumption", + name="Leistungsaufnahme (Haus)", + device_class=DEVICE_CLASS_POWER, + native_unit_of_measurement=POWER_WATT, + state_class=STATE_CLASS_MEASUREMENT, + ), + openwbSensorEntityDescription( + key="evu/WhImported", + name="Energie-Import (Haus)", + device_class=DEVICE_CLASS_ENERGY, + native_unit_of_measurement=ENERGY_WATT_HOUR, + state_class=STATE_CLASS_TOTAL_INCREASING, + ), + openwbSensorEntityDescription( + key="evu/WhExported", + name="Energie-Export (Haus)", + device_class=DEVICE_CLASS_ENERGY, + native_unit_of_measurement=ENERGY_WATT_HOUR, + state_class=STATE_CLASS_TOTAL_INCREASING, + ), + openwbSensorEntityDescription( + key="pv/WhCounter", + name="Energie-Erzeugt (Haus)", + device_class=DEVICE_CLASS_ENERGY, + native_unit_of_measurement=ENERGY_WATT_HOUR, + state_class=STATE_CLASS_TOTAL_INCREASING, + ), ] """ From 1f78c0d89de58b85e496e5d032992163e712a6ed Mon Sep 17 00:00:00 2001 From: kaepse <31590145+kaepse@users.noreply.github.com> Date: Sat, 16 Oct 2021 09:06:37 +0200 Subject: [PATCH 2/2] Extended global sensors (regarding house) added global sensors for house: - added sensor for production (PV) --- custom_components/openwbmqtt/const.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/custom_components/openwbmqtt/const.py b/custom_components/openwbmqtt/const.py index 80b68e9..1ad1dde 100644 --- a/custom_components/openwbmqtt/const.py +++ b/custom_components/openwbmqtt/const.py @@ -76,7 +76,14 @@ class openwbSensorEntityDescription(SensorEntityDescription): device_class=DEVICE_CLASS_POWER, native_unit_of_measurement=POWER_WATT, state_class=STATE_CLASS_MEASUREMENT, - ), + ), + openwbSensorEntityDescription( + key="pv/W", + name="Leistungsabgabe (Haus PV)", + device_class=DEVICE_CLASS_POWER, + native_unit_of_measurement=POWER_WATT, + state_class=STATE_CLASS_MEASUREMENT, + ), openwbSensorEntityDescription( key="evu/WhImported", name="Energie-Import (Haus)",