Update xknx to 0.20.2 (#69853)

This commit is contained in:
Marvin Wichmann 2022-04-11 16:51:13 +02:00 committed by GitHub
parent 81a55703bf
commit 3d30a757bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 13 deletions

View File

@ -288,9 +288,3 @@ class KNXClimate(KnxEntity, ClimateEntity):
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."""
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)

View File

@ -45,4 +45,5 @@ class KnxEntity(Entity):
async def async_will_remove_from_hass(self) -> None:
"""Disconnect device object when removed."""
self._device.unregister_device_updated_cb(self.after_update_callback)
# will also remove all callbacks
self._device.shutdown()

View File

@ -3,7 +3,7 @@
"name": "KNX",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/knx",
"requirements": ["xknx==0.20.1"],
"requirements": ["xknx==0.20.2"],
"codeowners": ["@Julius2342", "@farmio", "@marvin-w"],
"quality_scale": "silver",
"iot_class": "local_push",

View File

@ -2438,7 +2438,7 @@ xbox-webapi==2.0.11
xboxapi==2.0.1
# homeassistant.components.knx
xknx==0.20.1
xknx==0.20.2
# homeassistant.components.bluesound
# homeassistant.components.fritz

View File

@ -1578,7 +1578,7 @@ wolf_smartset==0.1.11
xbox-webapi==2.0.11
# homeassistant.components.knx
xknx==0.20.1
xknx==0.20.2
# homeassistant.components.bluesound
# homeassistant.components.fritz

View File

@ -158,9 +158,8 @@ async def test_climate_preset_mode(hass: HomeAssistant, knx: KNXTestKit):
er.async_remove("climate.test")
await hass.async_block_till_done()
assert len(knx.xknx.devices) == 2
assert len(knx.xknx.devices[0].device_updated_cbs) == 1
assert len(knx.xknx.devices[1].device_updated_cbs) == 1
# If we remove the entity the underlying devices should disappear too
assert len(knx.xknx.devices) == 0
async def test_update_entity(hass: HomeAssistant, knx: KNXTestKit):