Fix return type for entity update methods (#67184)
parent
d495bded5c
commit
2af5b2c845
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue