From 8b24409cd650c9c2cd1234e0caf032ba5b2d7883 Mon Sep 17 00:00:00 2001 From: craibo Date: Sun, 5 Jun 2022 23:46:34 +1000 Subject: [PATCH] 2022.06.2 - Remove incorrect parameters --- custom_components/ha_strava/camera.py | 4 +--- custom_components/ha_strava/sensor.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/custom_components/ha_strava/camera.py b/custom_components/ha_strava/camera.py index 65cb580..7fb7e79 100644 --- a/custom_components/ha_strava/camera.py +++ b/custom_components/ha_strava/camera.py @@ -182,7 +182,5 @@ async def async_added_to_hass(self): self.hass.bus.async_listen(CONF_IMG_UPDATE_EVENT, self.img_update_handler) async def async_will_remove_from_hass(self): - self.hass.bus._async_remove_listener( - event_type=CONF_IMG_UPDATE_EVENT, listener=self.img_update_handler, - ) + await super().async_will_remove_from_hass() diff --git a/custom_components/ha_strava/sensor.py b/custom_components/ha_strava/sensor.py index db892f5..04a91b9 100644 --- a/custom_components/ha_strava/sensor.py +++ b/custom_components/ha_strava/sensor.py @@ -407,5 +407,5 @@ async def async_added_to_hass(self): ) async def async_will_remove_from_hass(self): - super().async_will_remove_from_hass(self) + await super().async_will_remove_from_hass()