mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 20:55:10 +02:00
Improve entity type hints [q] (#77875)
This commit is contained in:
@@ -113,7 +113,7 @@ class QBittorrentSensor(SensorEntity):
|
|||||||
self._attr_name = f"{client_name} {description.name}"
|
self._attr_name = f"{client_name} {description.name}"
|
||||||
self._attr_available = False
|
self._attr_available = False
|
||||||
|
|
||||||
def update(self):
|
def update(self) -> None:
|
||||||
"""Get the latest data from qBittorrent and updates the state."""
|
"""Get the latest data from qBittorrent and updates the state."""
|
||||||
try:
|
try:
|
||||||
data = self.client.sync_main_data()
|
data = self.client.sync_main_data()
|
||||||
|
@@ -330,7 +330,7 @@ class QNAPSensor(SensorEntity):
|
|||||||
)
|
)
|
||||||
return f"{server_name} {self.entity_description.name}"
|
return f"{server_name} {self.entity_description.name}"
|
||||||
|
|
||||||
def update(self):
|
def update(self) -> None:
|
||||||
"""Get the latest data for the states."""
|
"""Get the latest data for the states."""
|
||||||
self._api.update()
|
self._api.update()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user