Improve entity type hints [c] (#77023)

This commit is contained in:
epenet 2022-08-19 13:02:46 +02:00 committed by GitHub
parent 80c1c11b1a
commit 0f792eb92e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 63 additions and 57 deletions

View file

@ -161,7 +161,7 @@ class AccountSensor(SensorEntity):
ATTR_NATIVE_BALANCE: f"{self._native_balance} {self._native_currency}",
}
def update(self):
def update(self) -> None:
"""Get the latest state of the sensor."""
self._coinbase_data.update()
for account in self._coinbase_data.accounts:
@ -233,7 +233,7 @@ class ExchangeRateSensor(SensorEntity):
"""Return the state attributes of the sensor."""
return {ATTR_ATTRIBUTION: ATTRIBUTION}
def update(self):
def update(self) -> None:
"""Get the latest state of the sensor."""
self._coinbase_data.update()
self._state = round(