mirror of
https://github.com/home-assistant/core.git
synced 2025-11-15 22:10:09 +00:00
Use literal string interpolation in integrations X-Z (f-strings) (#26395)
This commit is contained in:
committed by
Pascal Vizeli
parent
445c741b30
commit
dae6895a95
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user