Use literal string interpolation in integrations H-J (f-strings) (#26380)

This commit is contained in:
Franck Nijhof 2019-09-03 17:27:14 +02:00 committed by Pascal Vizeli
parent 13bb2ea35a
commit f9edec19ad
59 changed files with 128 additions and 139 deletions

View file

@ -76,7 +76,7 @@ class HTU21DSensor(Entity):
def __init__(self, htu21d_client, name, variable, unit):
"""Initialize the sensor."""
self._name = "{}_{}".format(name, variable)
self._name = f"{name}_{variable}"
self._variable = variable
self._unit_of_measurement = unit
self._client = htu21d_client