mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 04:50:05 +00:00
Use literal string interpolation in integrations B-D (f-strings) (#26378)
This commit is contained in:
committed by
Pascal Vizeli
parent
105461edb5
commit
6a24d893c8
@@ -44,7 +44,7 @@ class AccountSensor(Entity):
|
||||
def __init__(self, coinbase_data, name, currency):
|
||||
"""Initialize the sensor."""
|
||||
self._coinbase_data = coinbase_data
|
||||
self._name = "Coinbase {}".format(name)
|
||||
self._name = f"Coinbase {name}"
|
||||
self._state = None
|
||||
self._unit_of_measurement = currency
|
||||
self._native_balance = None
|
||||
@@ -97,7 +97,7 @@ class ExchangeRateSensor(Entity):
|
||||
"""Initialize the sensor."""
|
||||
self._coinbase_data = coinbase_data
|
||||
self.currency = exchange_currency
|
||||
self._name = "{} Exchange Rate".format(exchange_currency)
|
||||
self._name = f"{exchange_currency} Exchange Rate"
|
||||
self._state = None
|
||||
self._unit_of_measurement = native_currency
|
||||
|
||||
|
||||
Reference in New Issue
Block a user