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:
1 parent
7714160f4c
commit
157f972d72
77 files changed
+158
-246
No files matched your search
@@ -27,7 +27,6 @@ from homeassistant.util import dt as dt_util
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DOMAIN = "input_datetime"
|
||||
ENTITY_ID_FORMAT = DOMAIN + ".{}"
|
||||
|
||||
CONF_HAS_DATE = "has_date"
|
||||
CONF_HAS_TIME = "has_time"
|
||||
@@ -219,7 +218,7 @@ class InputDatetime(RestoreEntity):
|
||||
def from_yaml(cls, config: typing.Dict) -> "InputDatetime":
|
||||
"""Return entity instance initialized from yaml storage."""
|
||||
input_dt = cls(config)
|
||||
input_dt.entity_id = ENTITY_ID_FORMAT.format(config[CONF_ID])
|
||||
input_dt.entity_id = f"{DOMAIN}.{config[CONF_ID]}"
|
||||
input_dt.editable = False
|
||||
return input_dt
|
||||
|
||||
|
||||
Reference in new issue
Block a user