Add `current` sensor for Shelly RPC devices (#88863)
parent
b84eead3f8
commit
79bcdf43f7
|
@ -439,6 +439,16 @@ RPC_SENSORS: Final = {
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
),
|
),
|
||||||
|
"current": RpcSensorDescription(
|
||||||
|
key="switch",
|
||||||
|
sub_key="current",
|
||||||
|
name="Current",
|
||||||
|
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
|
||||||
|
value=lambda status, _: None if status is None else float(status),
|
||||||
|
device_class=SensorDeviceClass.CURRENT,
|
||||||
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
entity_registry_enabled_default=False,
|
||||||
|
),
|
||||||
"a_current": RpcSensorDescription(
|
"a_current": RpcSensorDescription(
|
||||||
key="em",
|
key="em",
|
||||||
sub_key="a_current",
|
sub_key="a_current",
|
||||||
|
|
Loading…
Reference in New Issue