Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
add missing TypeHints
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas55555 committed Feb 17, 2022
1 parent 432be1f commit 4077e61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/husqvarna_automower/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ def get_mower_attributes(self) -> dict:
"""Get the mower attributes of the current mower."""
return self.session.data["data"][self.idx]["attributes"]

async def async_added_to_hass(self):
async def async_added_to_hass(self) -> None:
"""Call when entity about to be added to Home Assistant."""
await super().async_added_to_hass()
self.session.register_data_callback(
lambda _: self.async_write_ha_state(), schedule_immediately=True
)

async def async_will_remove_from_hass(self):
async def async_will_remove_from_hass(self) -> None:
"""Call when entity is being removed from Home Assistant."""
await super().async_will_remove_from_hass()
self.session.unregister_data_callback(lambda _: self.async_write_ha_state())
Expand Down

0 comments on commit 4077e61

Please sign in to comment.