mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 15:47:12 +00:00
Use translation_placeholders in tuya select descriptions (#149251)
This commit is contained in:
parent
969ad232aa
commit
252a46d141
@ -320,17 +320,20 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = {
|
||||
SelectEntityDescription(
|
||||
key=DPCode.LED_TYPE_1,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
translation_key="led_type",
|
||||
translation_key="indexed_led_type",
|
||||
translation_placeholders={"index": "1"},
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.LED_TYPE_2,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
translation_key="led_type_2",
|
||||
translation_key="indexed_led_type",
|
||||
translation_placeholders={"index": "2"},
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.LED_TYPE_3,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
translation_key="led_type_3",
|
||||
translation_key="indexed_led_type",
|
||||
translation_placeholders={"index": "3"},
|
||||
),
|
||||
),
|
||||
# Dimmer
|
||||
@ -339,12 +342,14 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = {
|
||||
SelectEntityDescription(
|
||||
key=DPCode.LED_TYPE_1,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
translation_key="led_type",
|
||||
translation_key="indexed_led_type",
|
||||
translation_placeholders={"index": "1"},
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.LED_TYPE_2,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
translation_key="led_type_2",
|
||||
translation_key="indexed_led_type",
|
||||
translation_placeholders={"index": "2"},
|
||||
),
|
||||
),
|
||||
}
|
||||
|
@ -296,16 +296,8 @@
|
||||
"led": "LED"
|
||||
}
|
||||
},
|
||||
"led_type_2": {
|
||||
"name": "Light 2 source type",
|
||||
"state": {
|
||||
"halogen": "[%key:component::tuya::entity::select::led_type::state::halogen%]",
|
||||
"incandescent": "[%key:component::tuya::entity::select::led_type::state::incandescent%]",
|
||||
"led": "[%key:component::tuya::entity::select::led_type::state::led%]"
|
||||
}
|
||||
},
|
||||
"led_type_3": {
|
||||
"name": "Light 3 source type",
|
||||
"indexed_led_type": {
|
||||
"name": "Light {index} source type",
|
||||
"state": {
|
||||
"halogen": "[%key:component::tuya::entity::select::led_type::state::halogen%]",
|
||||
"incandescent": "[%key:component::tuya::entity::select::led_type::state::incandescent%]",
|
||||
|
Loading…
x
Reference in New Issue
Block a user