Add translation keys to Tuya cover (#98040)

This commit is contained in:
Joost Lekkerkerker
2023-08-08 18:02:47 +02:00
committed by GitHub
parent ce1077934a
commit c78c2b7c3b
2 changed files with 11 additions and 0 deletions

View File

@@ -44,6 +44,7 @@ COVERS: dict[str, tuple[TuyaCoverEntityDescription, ...]] = {
"cl": (
TuyaCoverEntityDescription(
key=DPCode.CONTROL,
translation_key="curtain",
current_state=DPCode.SITUATION_SET,
current_position=(DPCode.PERCENT_CONTROL, DPCode.PERCENT_STATE),
set_position=DPCode.PERCENT_CONTROL,
@@ -65,6 +66,7 @@ COVERS: dict[str, tuple[TuyaCoverEntityDescription, ...]] = {
),
TuyaCoverEntityDescription(
key=DPCode.MACH_OPERATE,
translation_key="curtain",
current_position=DPCode.POSITION,
set_position=DPCode.POSITION,
device_class=CoverDeviceClass.CURTAIN,
@@ -76,6 +78,7 @@ COVERS: dict[str, tuple[TuyaCoverEntityDescription, ...]] = {
# It is used by the Kogan Smart Blinds Driver
TuyaCoverEntityDescription(
key=DPCode.SWITCH_1,
translation_key="blind",
current_position=DPCode.PERCENT_CONTROL,
set_position=DPCode.PERCENT_CONTROL,
device_class=CoverDeviceClass.BLIND,
@@ -111,6 +114,7 @@ COVERS: dict[str, tuple[TuyaCoverEntityDescription, ...]] = {
"clkg": (
TuyaCoverEntityDescription(
key=DPCode.CONTROL,
translation_key="curtain",
current_position=DPCode.PERCENT_CONTROL,
set_position=DPCode.PERCENT_CONTROL,
device_class=CoverDeviceClass.CURTAIN,
@@ -128,6 +132,7 @@ COVERS: dict[str, tuple[TuyaCoverEntityDescription, ...]] = {
"jdcljqr": (
TuyaCoverEntityDescription(
key=DPCode.CONTROL,
translation_key="curtain",
current_position=DPCode.PERCENT_STATE,
set_position=DPCode.PERCENT_CONTROL,
device_class=CoverDeviceClass.CURTAIN,

View File

@@ -71,6 +71,12 @@
}
},
"cover": {
"blind": {
"name": "[%key:component::cover::entity_component::blind::name%]"
},
"curtain": {
"name": "[%key:component::cover::entity_component::curtain::name%]"
},
"curtain_2": {
"name": "Curtain 2"
},