From 9f98a418cdf1a9f7552b561f178979b5109dc105 Mon Sep 17 00:00:00 2001 From: Maciej Bieniek Date: Fri, 21 Jul 2023 15:18:14 +0000 Subject: [PATCH] Add new sensors for Shelly Pro 3EM (#97006) * Add new sensors * Fix typo --- homeassistant/components/shelly/sensor.py | 25 +++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/homeassistant/components/shelly/sensor.py b/homeassistant/components/shelly/sensor.py index 0260a540f0c..3e9dfaad923 100644 --- a/homeassistant/components/shelly/sensor.py +++ b/homeassistant/components/shelly/sensor.py @@ -360,6 +360,14 @@ RPC_SENSORS: Final = { device_class=SensorDeviceClass.POWER, state_class=SensorStateClass.MEASUREMENT, ), + "total_act_power": RpcSensorDescription( + key="em", + sub_key="total_act_power", + name="Total active power", + native_unit_of_measurement=UnitOfPower.WATT, + device_class=SensorDeviceClass.POWER, + state_class=SensorStateClass.MEASUREMENT, + ), "a_aprt_power": RpcSensorDescription( key="em", sub_key="a_aprt_power", @@ -384,6 +392,14 @@ RPC_SENSORS: Final = { device_class=SensorDeviceClass.APPARENT_POWER, state_class=SensorStateClass.MEASUREMENT, ), + "total_aprt_power": RpcSensorDescription( + key="em", + sub_key="total_aprt_power", + name="Total apparent power", + native_unit_of_measurement=UnitOfApparentPower.VOLT_AMPERE, + device_class=SensorDeviceClass.APPARENT_POWER, + state_class=SensorStateClass.MEASUREMENT, + ), "a_pf": RpcSensorDescription( key="em", sub_key="a_pf", @@ -480,6 +496,15 @@ RPC_SENSORS: Final = { state_class=SensorStateClass.MEASUREMENT, entity_registry_enabled_default=False, ), + "total_current": RpcSensorDescription( + key="em", + sub_key="total_current", + name="Total current", + native_unit_of_measurement=UnitOfElectricCurrent.AMPERE, + device_class=SensorDeviceClass.CURRENT, + state_class=SensorStateClass.MEASUREMENT, + entity_registry_enabled_default=False, + ), "energy": RpcSensorDescription( key="switch", sub_key="aenergy",