diff --git a/homeassistant/components/shelly/sensor.py b/homeassistant/components/shelly/sensor.py index ec5f31dae8a..ad25c83a19b 100644 --- a/homeassistant/components/shelly/sensor.py +++ b/homeassistant/components/shelly/sensor.py @@ -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",