mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 23:27:37 +00:00
Use translation_placeholders in tuya number descriptions (#149250)
This commit is contained in:
parent
252a46d141
commit
316ac6253b
@ -266,32 +266,38 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
|
||||
"tgkg": (
|
||||
NumberEntityDescription(
|
||||
key=DPCode.BRIGHTNESS_MIN_1,
|
||||
translation_key="minimum_brightness",
|
||||
translation_key="indexed_minimum_brightness",
|
||||
translation_placeholders={"index": "1"},
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.BRIGHTNESS_MAX_1,
|
||||
translation_key="maximum_brightness",
|
||||
translation_key="indexed_maximum_brightness",
|
||||
translation_placeholders={"index": "1"},
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.BRIGHTNESS_MIN_2,
|
||||
translation_key="minimum_brightness_2",
|
||||
translation_key="indexed_minimum_brightness",
|
||||
translation_placeholders={"index": "2"},
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.BRIGHTNESS_MAX_2,
|
||||
translation_key="maximum_brightness_2",
|
||||
translation_key="indexed_maximum_brightness",
|
||||
translation_placeholders={"index": "2"},
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.BRIGHTNESS_MIN_3,
|
||||
translation_key="minimum_brightness_3",
|
||||
translation_key="indexed_minimum_brightness",
|
||||
translation_placeholders={"index": "3"},
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.BRIGHTNESS_MAX_3,
|
||||
translation_key="maximum_brightness_3",
|
||||
translation_key="indexed_maximum_brightness",
|
||||
translation_placeholders={"index": "3"},
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
@ -300,22 +306,26 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
|
||||
"tgq": (
|
||||
NumberEntityDescription(
|
||||
key=DPCode.BRIGHTNESS_MIN_1,
|
||||
translation_key="minimum_brightness",
|
||||
translation_key="indexed_minimum_brightness",
|
||||
translation_placeholders={"index": "1"},
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.BRIGHTNESS_MAX_1,
|
||||
translation_key="maximum_brightness",
|
||||
translation_key="indexed_maximum_brightness",
|
||||
translation_placeholders={"index": "1"},
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.BRIGHTNESS_MIN_2,
|
||||
translation_key="minimum_brightness_2",
|
||||
translation_key="indexed_minimum_brightness",
|
||||
translation_placeholders={"index": "2"},
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
NumberEntityDescription(
|
||||
key=DPCode.BRIGHTNESS_MAX_2,
|
||||
translation_key="maximum_brightness_2",
|
||||
translation_key="indexed_maximum_brightness",
|
||||
translation_placeholders={"index": "2"},
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
|
@ -199,17 +199,11 @@
|
||||
"maximum_brightness": {
|
||||
"name": "Maximum brightness"
|
||||
},
|
||||
"minimum_brightness_2": {
|
||||
"name": "Minimum brightness 2"
|
||||
"indexed_minimum_brightness": {
|
||||
"name": "Minimum brightness {index}"
|
||||
},
|
||||
"maximum_brightness_2": {
|
||||
"name": "Maximum brightness 2"
|
||||
},
|
||||
"minimum_brightness_3": {
|
||||
"name": "Minimum brightness 3"
|
||||
},
|
||||
"maximum_brightness_3": {
|
||||
"name": "Maximum brightness 3"
|
||||
"indexed_maximum_brightness": {
|
||||
"name": "Maximum brightness {index}"
|
||||
},
|
||||
"move_down": {
|
||||
"name": "Move down"
|
||||
|
Loading…
x
Reference in New Issue
Block a user