Migrate Overkiz select translations (#83324)

This commit is contained in:
Franck Nijhof 2022-12-05 17:24:59 +01:00 committed by GitHub
parent 150e49f4c2
commit 399f0ea161
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 37 additions and 18 deletions

View File

@ -127,8 +127,6 @@ class OverkizDeviceClass(StrEnum):
BATTERY = "overkiz__battery" BATTERY = "overkiz__battery"
DISCRETE_RSSI_LEVEL = "overkiz__discrete_rssi_level" DISCRETE_RSSI_LEVEL = "overkiz__discrete_rssi_level"
MEMORIZED_SIMPLE_VOLUME = "overkiz__memorized_simple_volume"
OPEN_CLOSED_PEDESTRIAN = "overkiz__open_closed_pedestrian"
PRIORITY_LOCK_ORIGINATOR = "overkiz__priority_lock_originator" PRIORITY_LOCK_ORIGINATOR = "overkiz__priority_lock_originator"
SENSOR_DEFECT = "overkiz__sensor_defect" SENSOR_DEFECT = "overkiz__sensor_defect"
SENSOR_ROOM = "overkiz__sensor_room" SENSOR_ROOM = "overkiz__sensor_room"

View File

@ -14,7 +14,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
from . import HomeAssistantOverkizData from . import HomeAssistantOverkizData
from .const import DOMAIN, IGNORED_OVERKIZ_DEVICES from .const import DOMAIN, IGNORED_OVERKIZ_DEVICES
from .entity import OverkizDescriptiveEntity, OverkizDeviceClass from .entity import OverkizDescriptiveEntity
@dataclass @dataclass
@ -71,7 +71,7 @@ SELECT_DESCRIPTIONS: list[OverkizSelectDescription] = [
OverkizCommandParam.CLOSED, OverkizCommandParam.CLOSED,
], ],
select_option=_select_option_open_closed_pedestrian, select_option=_select_option_open_closed_pedestrian,
device_class=OverkizDeviceClass.OPEN_CLOSED_PEDESTRIAN, translation_key="open_closed_pedestrian",
), ),
OverkizSelectDescription( OverkizSelectDescription(
key=OverkizState.IO_MEMORIZED_SIMPLE_VOLUME, key=OverkizState.IO_MEMORIZED_SIMPLE_VOLUME,
@ -80,7 +80,7 @@ SELECT_DESCRIPTIONS: list[OverkizSelectDescription] = [
options=[OverkizCommandParam.STANDARD, OverkizCommandParam.HIGHEST], options=[OverkizCommandParam.STANDARD, OverkizCommandParam.HIGHEST],
select_option=_select_option_memorized_simple_volume, select_option=_select_option_memorized_simple_volume,
entity_category=EntityCategory.CONFIG, entity_category=EntityCategory.CONFIG,
device_class=OverkizDeviceClass.MEMORIZED_SIMPLE_VOLUME, translation_key="memorized_simple_volume",
), ),
# SomfyHeatingTemperatureInterface # SomfyHeatingTemperatureInterface
OverkizSelectDescription( OverkizSelectDescription(

View File

@ -26,5 +26,22 @@
"reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]", "reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]",
"reauth_wrong_account": "You can only reauthenticate this entry with the same Overkiz account and hub" "reauth_wrong_account": "You can only reauthenticate this entry with the same Overkiz account and hub"
} }
},
"entity": {
"select": {
"open_closed_pedestrian": {
"state": {
"open": "Open",
"pedestrian": "Pedestrian",
"closed": "Closed"
}
},
"memorized_simple_volume": {
"state": {
"highest": "Highest",
"standard": "Standard"
}
}
}
} }
} }

View File

@ -1,13 +0,0 @@
{
"state": {
"overkiz__open_closed_pedestrian": {
"open": "Open",
"pedestrian": "Pedestrian",
"closed": "Closed"
},
"overkiz__memorized_simple_volume": {
"highest": "Highest",
"standard": "Standard"
}
}
}

View File

@ -26,5 +26,22 @@
"description": "The Overkiz platform is used by various vendors like Somfy (Connexoon / TaHoma), Hitachi (Hi Kumo), Rexel (Energeasy Connect) and Atlantic (Cozytouch). Enter your application credentials and select your hub." "description": "The Overkiz platform is used by various vendors like Somfy (Connexoon / TaHoma), Hitachi (Hi Kumo), Rexel (Energeasy Connect) and Atlantic (Cozytouch). Enter your application credentials and select your hub."
} }
} }
},
"entity": {
"select": {
"memorized_simple_volume": {
"state": {
"highest": "Highest",
"standard": "Standard"
}
},
"open_closed_pedestrian": {
"state": {
"closed": "Closed",
"open": "Open",
"pedestrian": "Pedestrian"
}
}
}
} }
} }