From 149e9ddd7300e92953ef6ce373930e3ec7a77429 Mon Sep 17 00:00:00 2001 From: SaSa1983 Date: Fri, 14 May 2021 16:04:48 +0200 Subject: [PATCH 1/2] Add PV3 / DC3 sensors to Kostal Plenticore --- .../components/kostal_plenticore/const.py | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/homeassistant/components/kostal_plenticore/const.py b/homeassistant/components/kostal_plenticore/const.py index 8342ff74adaf1..cc94292e8f739 100644 --- a/homeassistant/components/kostal_plenticore/const.py +++ b/homeassistant/components/kostal_plenticore/const.py @@ -114,6 +114,13 @@ {ATTR_UNIT_OF_MEASUREMENT: POWER_WATT, ATTR_DEVICE_CLASS: DEVICE_CLASS_POWER}, "format_round", ), + ( + "devices:local:pv3", + "P", + "DC3 Power", + {ATTR_UNIT_OF_MEASUREMENT: POWER_WATT, ATTR_DEVICE_CLASS: DEVICE_CLASS_POWER}, + "format_round", + ), ( "devices:local", "PV2Bat_P", @@ -445,6 +452,46 @@ }, "format_energy", ), + ( + "scb:statistic:EnergyFlow", + "Statistic:EnergyPv3:Day", + "Energy PV3 Day", + { + ATTR_UNIT_OF_MEASUREMENT: ENERGY_KILO_WATT_HOUR, + ATTR_DEVICE_CLASS: DEVICE_CLASS_ENERGY, + }, + "format_energy", + ), + ( + "scb:statistic:EnergyFlow", + "Statistic:EnergyPv3:Month", + "Energy PV3 Month", + { + ATTR_UNIT_OF_MEASUREMENT: ENERGY_KILO_WATT_HOUR, + ATTR_DEVICE_CLASS: DEVICE_CLASS_ENERGY, + }, + "format_energy", + ), + ( + "scb:statistic:EnergyFlow", + "Statistic:EnergyPv3:Year", + "Energy PV3 Year", + { + ATTR_UNIT_OF_MEASUREMENT: ENERGY_KILO_WATT_HOUR, + ATTR_DEVICE_CLASS: DEVICE_CLASS_ENERGY, + }, + "format_energy", + ), + ( + "scb:statistic:EnergyFlow", + "Statistic:EnergyPv3:Total", + "Energy PV3 Total", + { + ATTR_UNIT_OF_MEASUREMENT: ENERGY_KILO_WATT_HOUR, + ATTR_DEVICE_CLASS: DEVICE_CLASS_ENERGY, + }, + "format_energy", + ), ( "scb:statistic:EnergyFlow", "Statistic:Yield:Day", From ddece10e1d57d33bda81aa709c9411604e824f7f Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 15 May 2021 16:02:22 +0200 Subject: [PATCH 2/2] black --- homeassistant/components/kostal_plenticore/const.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/kostal_plenticore/const.py b/homeassistant/components/kostal_plenticore/const.py index cc94292e8f739..5c223f4f5d68c 100644 --- a/homeassistant/components/kostal_plenticore/const.py +++ b/homeassistant/components/kostal_plenticore/const.py @@ -120,7 +120,7 @@ "DC3 Power", {ATTR_UNIT_OF_MEASUREMENT: POWER_WATT, ATTR_DEVICE_CLASS: DEVICE_CLASS_POWER}, "format_round", - ), + ), ( "devices:local", "PV2Bat_P", @@ -491,7 +491,7 @@ ATTR_DEVICE_CLASS: DEVICE_CLASS_ENERGY, }, "format_energy", - ), + ), ( "scb:statistic:EnergyFlow", "Statistic:Yield:Day",