Update xknx to 0.18.7 (#52000)

This commit is contained in:
Matthias Alphart 2021-06-19 05:22:27 +02:00 committed by GitHub
parent 8901e1f157
commit c246e211eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 10 deletions

View file

@ -3,7 +3,7 @@ from __future__ import annotations
from typing import cast
from xknx.devices import Climate as XknxClimate, Device as XknxDevice
from xknx.devices import Device as XknxDevice
from homeassistant.helpers.entity import Entity
@ -52,12 +52,6 @@ class KnxEntity(Entity):
"""Store register state change callback."""
self._device.register_device_updated_cb(self.after_update_callback)
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) and self._device.mode is not None:
self._device.mode.unregister_device_updated_cb(self.after_update_callback)