Use literal string interpolation in integrations X-Z (f-strings) (#26395)
This commit is contained in:
parent
445c741b30
commit
dae6895a95
36 changed files with 115 additions and 137 deletions
|
@ -68,7 +68,7 @@ class ZMSensorMonitors(Entity):
|
|||
@property
|
||||
def name(self):
|
||||
"""Return the name of the sensor."""
|
||||
return "{} Status".format(self._monitor.name)
|
||||
return f"{self._monitor.name} Status"
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
|
@ -105,7 +105,7 @@ class ZMSensorEvents(Entity):
|
|||
@property
|
||||
def name(self):
|
||||
"""Return the name of the sensor."""
|
||||
return "{} {}".format(self._monitor.name, self.time_period.title)
|
||||
return f"{self._monitor.name} {self.time_period.title}"
|
||||
|
||||
@property
|
||||
def unit_of_measurement(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue