From 2af5b2c84562584075ec7276ec6bf860ac15bb2b Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Thu, 24 Feb 2022 18:25:38 +0100 Subject: [PATCH] Fix return type for entity update methods (#67184) --- homeassistant/components/dunehd/media_player.py | 3 +-- homeassistant/components/fireservicerota/switch.py | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/dunehd/media_player.py b/homeassistant/components/dunehd/media_player.py index 437b5b66a99..252cf82df42 100644 --- a/homeassistant/components/dunehd/media_player.py +++ b/homeassistant/components/dunehd/media_player.py @@ -93,11 +93,10 @@ class DuneHDPlayerEntity(MediaPlayerEntity): self._state: dict[str, Any] = {} self._unique_id = unique_id - def update(self) -> bool: + def update(self) -> None: """Update internal status of the entity.""" self._state = self._player.update_state() self.__update_title() - return True @property def state(self) -> str | None: diff --git a/homeassistant/components/fireservicerota/switch.py b/homeassistant/components/fireservicerota/switch.py index e625ac5deb5..48ec1a77c54 100644 --- a/homeassistant/components/fireservicerota/switch.py +++ b/homeassistant/components/fireservicerota/switch.py @@ -136,16 +136,15 @@ class ResponseSwitch(SwitchEntity): """Handle updated incident data from the client.""" self.async_schedule_update_ha_state(True) - async def async_update(self) -> bool: + async def async_update(self) -> None: """Update FireServiceRota response data.""" data = await self._client.async_response_update() if not data or "status" not in data: - return False + return self._state = data["status"] == "acknowledged" self._state_attributes = data self._state_icon = data["status"] _LOGGER.debug("Set state of entity 'Response Switch' to '%s'", self._state) - return True