Improve entity type hints [q] (#77875)

pull/77878/head
epenet 2022-09-06 09:43:49 +02:00 committed by GitHub
parent 852b0caf5b
commit 7198273a42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -113,7 +113,7 @@ class QBittorrentSensor(SensorEntity):
self._attr_name = f"{client_name} {description.name}"
self._attr_available = False
def update(self):
def update(self) -> None:
"""Get the latest data from qBittorrent and updates the state."""
try:
data = self.client.sync_main_data()

View File

@ -330,7 +330,7 @@ class QNAPSensor(SensorEntity):
)
return f"{server_name} {self.entity_description.name}"
def update(self):
def update(self) -> None:
"""Get the latest data for the states."""
self._api.update()