mirror of
https://github.com/elisspace/core.git
synced 2026-09-29 13:59:54 +00:00
Use literal string interpolation in integrations R-S (f-strings) (#26392)
This commit is contained in:
committed by
Pascal Vizeli
parent
7203027cbf
commit
445c741b30
@@ -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."""
|
||||
|
||||
@@ -88,7 +88,7 @@ class SupplyAirTemperatureSensor(SmartySensor):
|
||||
def __init__(self, name, smarty):
|
||||
"""Supply Air Temperature Init."""
|
||||
super().__init__(
|
||||
name="{} Supply Air Temperature".format(name),
|
||||
name=f"{name} Supply Air Temperature",
|
||||
device_class=DEVICE_CLASS_TEMPERATURE,
|
||||
unit_of_measurement=TEMP_CELSIUS,
|
||||
smarty=smarty,
|
||||
@@ -106,7 +106,7 @@ class ExtractAirTemperatureSensor(SmartySensor):
|
||||
def __init__(self, name, smarty):
|
||||
"""Supply Air Temperature Init."""
|
||||
super().__init__(
|
||||
name="{} Extract Air Temperature".format(name),
|
||||
name=f"{name} Extract Air Temperature",
|
||||
device_class=DEVICE_CLASS_TEMPERATURE,
|
||||
unit_of_measurement=TEMP_CELSIUS,
|
||||
smarty=smarty,
|
||||
@@ -124,7 +124,7 @@ class OutdoorAirTemperatureSensor(SmartySensor):
|
||||
def __init__(self, name, smarty):
|
||||
"""Outdoor Air Temperature Init."""
|
||||
super().__init__(
|
||||
name="{} Outdoor Air Temperature".format(name),
|
||||
name=f"{name} Outdoor Air Temperature",
|
||||
device_class=DEVICE_CLASS_TEMPERATURE,
|
||||
unit_of_measurement=TEMP_CELSIUS,
|
||||
smarty=smarty,
|
||||
@@ -142,7 +142,7 @@ class SupplyFanSpeedSensor(SmartySensor):
|
||||
def __init__(self, name, smarty):
|
||||
"""Supply Fan Speed RPM Init."""
|
||||
super().__init__(
|
||||
name="{} Supply Fan Speed".format(name),
|
||||
name=f"{name} Supply Fan Speed",
|
||||
device_class=None,
|
||||
unit_of_measurement=None,
|
||||
smarty=smarty,
|
||||
@@ -160,7 +160,7 @@ class ExtractFanSpeedSensor(SmartySensor):
|
||||
def __init__(self, name, smarty):
|
||||
"""Extract Fan Speed RPM Init."""
|
||||
super().__init__(
|
||||
name="{} Extract Fan Speed".format(name),
|
||||
name=f"{name} Extract Fan Speed",
|
||||
device_class=None,
|
||||
unit_of_measurement=None,
|
||||
smarty=smarty,
|
||||
@@ -178,7 +178,7 @@ class FilterDaysLeftSensor(SmartySensor):
|
||||
def __init__(self, name, smarty):
|
||||
"""Filter Days Left Init."""
|
||||
super().__init__(
|
||||
name="{} Filter Days Left".format(name),
|
||||
name=f"{name} Filter Days Left",
|
||||
device_class=DEVICE_CLASS_TIMESTAMP,
|
||||
unit_of_measurement=None,
|
||||
smarty=smarty,
|
||||
|
||||
Reference in New Issue
Block a user