Fix ScrapeSensor.async_added_to_hass (#100125)

This commit is contained in:
Erik Montnemery 2023-09-11 16:58:56 +02:00 committed by GitHub
parent 9c65e59cc8
commit 6ccb74997c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -192,9 +192,7 @@ class ScrapeSensor(CoordinatorEntity[ScrapeCoordinator], ManualTriggerSensorEnti
async def async_added_to_hass(self) -> None:
"""Ensure the data from the initial update is reflected in the state."""
await ManualTriggerEntity.async_added_to_hass(self)
# https://github.com/python/mypy/issues/15097
await CoordinatorEntity.async_added_to_hass(self) # type: ignore[arg-type]
await super().async_added_to_hass()
self._async_update_from_rest_data()
def _async_update_from_rest_data(self) -> None: