Improve string formatting v5 (#33697)
* Improve string formatting v5 * Address review comments
This commit is contained in:
1 parent
39336d3ea3
commit
fca90a8ddc
46 files changed
+221
-252
No files matched your search
@@ -76,7 +76,7 @@ class CanarySensor(Entity):
|
||||
@property
|
||||
def unique_id(self):
|
||||
"""Return the unique ID of this sensor."""
|
||||
return "{}_{}".format(self._device_id, self._sensor_type[0])
|
||||
return f"{self._device_id}_{self._sensor_type[0]}"
|
||||
|
||||
@property
|
||||
def unit_of_measurement(self):
|
||||
|
||||
Reference in new issue
Block a user