Add removal condition to Shelly battery sensor (#113703)
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>pull/113714/head
parent
4d75940cd2
commit
d8f74571a1
|
@ -942,6 +942,7 @@ RPC_SENSORS: Final = {
|
|||
device_class=SensorDeviceClass.BATTERY,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
removal_condition=lambda _config, status, key: (status[key]["battery"] is None),
|
||||
),
|
||||
"voltmeter": RpcSensorDescription(
|
||||
key="voltmeter",
|
||||
|
|
Loading…
Reference in New Issue