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:
springstan 2020-02-28 12:39:29 +01:00 committed by GitHub
parent 7714160f4c
commit 157f972d72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
77 changed files with 158 additions and 246 deletions

View file

@ -196,9 +196,7 @@ class InfluxSensorData:
_LOGGER.error("Could not render where clause template: %s", ex)
return
self.query = "select {}({}) as value from {} where {}".format(
self.group, self.field, self.measurement, where_clause
)
self.query = f"select {self.group}({self.field}) as value from {self.measurement} where {where_clause}"
_LOGGER.info("Running query: %s", self.query)