Improve string formatting v5 (#33697)
* Improve string formatting v5 * Address review comments
This commit is contained in:
parent
39336d3ea3
commit
fca90a8ddc
46 changed files with 221 additions and 252 deletions
|
@ -82,7 +82,7 @@ class AccountSensor(Entity):
|
|||
"""Get the latest state of the sensor."""
|
||||
self._coinbase_data.update()
|
||||
for account in self._coinbase_data.accounts["data"]:
|
||||
if self._name == "Coinbase {}".format(account["name"]):
|
||||
if self._name == f"Coinbase {account['name']}":
|
||||
self._state = account["balance"]["amount"]
|
||||
self._native_balance = account["native_balance"]["amount"]
|
||||
self._native_currency = account["native_balance"]["currency"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue