Fix not awaiting async super method in KNX climate (#52005)

pull/52014/head
Matthias Alphart 2021-06-19 08:10:17 +02:00 committed by GitHub
parent c246e211eb
commit 1d941284ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -327,12 +327,12 @@ class KNXClimate(KnxEntity, ClimateEntity):
async def async_added_to_hass(self) -> None:
"""Store register state change callback."""
super().async_added_to_hass()
await super().async_added_to_hass()
if 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."""
super().async_will_remove_from_hass()
await super().async_will_remove_from_hass()
if self._device.mode is not None:
self._device.mode.unregister_device_updated_cb(self.after_update_callback)