Use literal string interpolation in integrations X-Z (f-strings) (#26395)

This commit is contained in:
Franck Nijhof 2019-09-03 21:15:31 +02:00 committed by Pascal Vizeli
parent 445c741b30
commit dae6895a95
36 changed files with 115 additions and 137 deletions

View file

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