Use f-strings in integrations starting with "M" (#32271)
* Use f-strings in integrations starting with "M" * Format mqtt light init with black * Fix lint error * Fix pylint error * Restore constants * Update homeassistant/components/mqtt/discovery.py * Update homeassistant/components/mqtt/discovery.py * Update homeassistant/components/mqtt/discovery.py * Update homeassistant/components/mqtt/discovery.py * Format with Black
This commit is contained in:
1 parent
bbe0f75336
commit
ba0aaeeddb
34 files changed
+62
-80
No files matched your search
@@ -115,9 +115,7 @@ class MinMaxSensor(Entity):
|
||||
if name:
|
||||
self._name = name
|
||||
else:
|
||||
self._name = "{} sensor".format(
|
||||
next(v for k, v in SENSOR_TYPES.items() if self._sensor_type == v)
|
||||
).capitalize()
|
||||
self._name = f"{next(v for k, v in SENSOR_TYPES.items() if self._sensor_type == v)} sensor".capitalize()
|
||||
self._unit_of_measurement = None
|
||||
self._unit_of_measurement_mismatch = False
|
||||
self.min_value = self.max_value = self.mean = self.last = None
|
||||
|
||||
Reference in new issue
Block a user