diff --git a/homeassistant/components/devolo_home_control/devolo_device.py b/homeassistant/components/devolo_home_control/devolo_device.py index b3cb68098e1..6087e07799d 100644 --- a/homeassistant/components/devolo_home_control/devolo_device.py +++ b/homeassistant/components/devolo_home_control/devolo_device.py @@ -7,6 +7,7 @@ from urllib.parse import urlparse from devolo_home_control_api.devices.zwave import Zwave from devolo_home_control_api.homecontrol import HomeControl +from homeassistant.components.sensor import SensorDeviceClass from homeassistant.helpers.entity import DeviceInfo, Entity from .const import DOMAIN @@ -71,7 +72,11 @@ class DevoloDeviceEntity(Entity): def _generic_message(self, message: tuple) -> None: """Handle generic messages.""" - if len(message) == 3 and message[2] == "battery_level": + if ( + len(message) == 3 + and message[2] == "battery_level" + and self.device_class == SensorDeviceClass.BATTERY + ): self._value = message[1] elif len(message) == 3 and message[2] == "status": # Maybe the API wants to tell us, that the device went on- or offline.