Use f-strings in integrations starting with "H" - "L" (#32265)
* Use f-strings in integrations starting with "H" * Use f-strings in integrations starting with "I" * Use f-strings in integrations starting with "J" * Use f-strings in integrations starting with "K" * Use f-strings in integrations starting with "L" * Fix lint error * Use join instead of f-string in homekit_controller * Use local variables with f-strings * Fix lint error * Escape the characters in f-string * Sort imports with isort in homeworks light * Fix pylint error * Fix broken tests * Fix broken tests v2
This commit is contained in:
parent
7714160f4c
commit
157f972d72
77 changed files with 158 additions and 246 deletions
|
@ -105,8 +105,8 @@ class IntegrationSensor(RestoreEntity):
|
|||
self._name = name if name is not None else f"{source_entity} integral"
|
||||
|
||||
if unit_of_measurement is None:
|
||||
self._unit_template = "{}{}{}".format(
|
||||
"" if unit_prefix is None else unit_prefix, "{}", unit_time
|
||||
self._unit_template = (
|
||||
f"{'' if unit_prefix is None else unit_prefix}{{}}{unit_time}"
|
||||
)
|
||||
# we postpone the definition of unit_of_measurement to later
|
||||
self._unit_of_measurement = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue