Use literal string interpolation in integrations R-S (f-strings) (#26392)

This commit is contained in:
Franck Nijhof
2019-09-03 21:14:39 +02:00
committed by Pascal Vizeli
parent 7203027cbf
commit 445c741b30
69 changed files with 129 additions and 149 deletions

View File

@@ -69,9 +69,7 @@ class BoostSensor(SmartyBinarySensor):
def __init__(self, name, smarty):
"""Alarm Sensor Init."""
super().__init__(
name="{} Boost State".format(name), device_class=None, smarty=smarty
)
super().__init__(name=f"{name} Boost State", device_class=None, smarty=smarty)
def update(self) -> None:
"""Update state."""
@@ -84,9 +82,7 @@ class AlarmSensor(SmartyBinarySensor):
def __init__(self, name, smarty):
"""Alarm Sensor Init."""
super().__init__(
name="{} Alarm".format(name), device_class="problem", smarty=smarty
)
super().__init__(name=f"{name} Alarm", device_class="problem", smarty=smarty)
def update(self) -> None:
"""Update state."""
@@ -99,9 +95,7 @@ class WarningSensor(SmartyBinarySensor):
def __init__(self, name, smarty):
"""Warning Sensor Init."""
super().__init__(
name="{} Warning".format(name), device_class="problem", smarty=smarty
)
super().__init__(name=f"{name} Warning", device_class="problem", smarty=smarty)
def update(self) -> None:
"""Update state."""