mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Improve entity type hints [q] (#77875)
This commit is contained in:
parent
852b0caf5b
commit
7198273a42
@ -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()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user