Skip to content

Commit 06a44de

Browse files
authored
Move Yeelight URLs out of translatable strings for action descriptions (home-assistant#157957)
1 parent 11b4d75 commit 06a44de

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

homeassistant/components/yeelight/light.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,12 @@ async def _async_set_auto_delay_off_scene(entity, service_call):
380380
SERVICE_SET_MODE, SERVICE_SCHEMA_SET_MODE, "async_set_mode"
381381
)
382382
platform.async_register_entity_service(
383-
SERVICE_START_FLOW, SERVICE_SCHEMA_START_FLOW, _async_start_flow
383+
SERVICE_START_FLOW,
384+
SERVICE_SCHEMA_START_FLOW,
385+
_async_start_flow,
386+
description_placeholders={
387+
"flow_objects_urls": "https://yeelight.readthedocs.io/en/stable/yeelight.html#flow-objects"
388+
},
384389
)
385390
platform.async_register_entity_service(
386391
SERVICE_SET_COLOR_SCENE, SERVICE_SCHEMA_SET_COLOR_SCENE, _async_set_color_scene
@@ -397,6 +402,9 @@ async def _async_set_auto_delay_off_scene(entity, service_call):
397402
SERVICE_SET_COLOR_FLOW_SCENE,
398403
SERVICE_SCHEMA_SET_COLOR_FLOW_SCENE,
399404
_async_set_color_flow_scene,
405+
description_placeholders={
406+
"examples_url": "https://yeelight.readthedocs.io/en/stable/flow.html"
407+
},
400408
)
401409
platform.async_register_entity_service(
402410
SERVICE_SET_AUTO_DELAY_OFF_SCENE,

homeassistant/components/yeelight/strings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
"name": "Count"
103103
},
104104
"transitions": {
105-
"description": "Array of transitions, for desired effect. Examples https://yeelight.readthedocs.io/en/stable/flow.html.",
105+
"description": "Array of transitions, for desired effect. Examples {examples_url}.",
106106
"name": "Transitions"
107107
}
108108
},
@@ -171,7 +171,7 @@
171171
"name": "Set music mode"
172172
},
173173
"start_flow": {
174-
"description": "Starts a custom flow, using transitions from https://yeelight.readthedocs.io/en/stable/yeelight.html#flow-objects.",
174+
"description": "Starts a custom flow, using transitions from {flow_objects_urls}.",
175175
"fields": {
176176
"action": {
177177
"description": "[%key:component::yeelight::services::set_color_flow_scene::fields::action::description%]",

0 commit comments

Comments
 (0)