1
0
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:
Franck Nijhof
2019-09-03 17:09:59 +02:00
committed by Pascal Vizeli
parent 105461edb5
commit 6a24d893c8
52 changed files with 116 additions and 126 deletions

View File

@@ -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