Use literal string interpolation in integrations H-J (f-strings) (#26380)

This commit is contained in:
Franck Nijhof 2019-09-03 17:27:14 +02:00 committed by Pascal Vizeli
parent 13bb2ea35a
commit f9edec19ad
59 changed files with 128 additions and 139 deletions

View file

@ -116,9 +116,7 @@ def validate_entity_config(values):
params = MEDIA_PLAYER_SCHEMA(feature)
key = params.pop(CONF_FEATURE)
if key in feature_list:
raise vol.Invalid(
"A feature can be added only once for {}".format(entity)
)
raise vol.Invalid(f"A feature can be added only once for {entity}")
feature_list[key] = params
config[CONF_FEATURE_LIST] = feature_list