Improve string formatting v3 (#33667)

* Improve string formatting v3

* Address review comment
This commit is contained in:
springstan 2020-04-05 01:32:58 +02:00 committed by GitHub
parent bf1b408038
commit c20a965eda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 32 additions and 37 deletions

View file

@ -28,7 +28,7 @@ class EcobeeBinarySensor(BinarySensorDevice):
def __init__(self, data, sensor_name, sensor_index):
"""Initialize the Ecobee sensor."""
self.data = data
self._name = sensor_name + " Occupancy"
self._name = f"{sensor_name} Occupancy"
self.sensor_name = sensor_name
self.index = sensor_index
self._state = None