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
@@ -51,14 +51,12 @@ class SetIntentHandler(intent.IntentHandler):
|
||||
service_data[ATTR_RGB_COLOR] = slots["color"]["value"]
|
||||
# Use original passed in value of the color because we don't have
|
||||
# human readable names for that internally.
|
||||
speech_parts.append(
|
||||
"the color {}".format(intent_obj.slots["color"]["value"])
|
||||
)
|
||||
speech_parts.append(f"the color {intent_obj.slots['color']['value']}")
|
||||
|
||||
if "brightness" in slots:
|
||||
intent.async_test_feature(state, SUPPORT_BRIGHTNESS, "changing brightness")
|
||||
service_data[ATTR_BRIGHTNESS_PCT] = slots["brightness"]["value"]
|
||||
speech_parts.append("{}% brightness".format(slots["brightness"]["value"]))
|
||||
speech_parts.append(f"{slots['brightness']['value']}% brightness")
|
||||
|
||||
await hass.services.async_call(
|
||||
DOMAIN, SERVICE_TURN_ON, service_data, context=intent_obj.context
|
||||
|
||||
Reference in new issue
Block a user