Add new sensors for Shelly Pro 3EM (#97006)

* Add new sensors

* Fix typo
pull/96949/head
Maciej Bieniek 2023-07-21 15:18:14 +00:00 committed by GitHub
parent 530556015f
commit 9f98a418cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 25 additions and 0 deletions

View File

@ -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",