diff --git a/homeassistant/components/knx/knx_entity.py b/homeassistant/components/knx/knx_entity.py index 296bcb2f540..f4597ad230e 100644 --- a/homeassistant/components/knx/knx_entity.py +++ b/homeassistant/components/knx/knx_entity.py @@ -40,12 +40,12 @@ class KnxEntity(Entity): """Store register state change callback.""" self._device.register_device_updated_cb(self.after_update_callback) - if isinstance(self._device, XknxClimate): + if isinstance(self._device, XknxClimate) and self._device.mode is not None: self._device.mode.register_device_updated_cb(self.after_update_callback) async def async_will_remove_from_hass(self) -> None: """Disconnect device object when removed.""" self._device.unregister_device_updated_cb(self.after_update_callback) - if isinstance(self._device, XknxClimate): + if isinstance(self._device, XknxClimate) and self._device.mode is not None: self._device.mode.unregister_device_updated_cb(self.after_update_callback)