Migrate Demo translations (#83294)

pull/83321/head
Franck Nijhof 2022-12-05 14:44:26 +01:00 committed by GitHub
parent aa4a0df194
commit f801fe307e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 13 deletions

View File

@ -25,13 +25,13 @@ async def async_setup_platform(
unique_id="speed",
name="Speed",
icon="mdi:speedometer",
device_class="demo__speed",
current_option="ridiculous_speed",
options=[
"light_speed",
"ridiculous_speed",
"ludicrous_speed",
],
translation_key="speed",
),
]
)
@ -56,17 +56,17 @@ class DemoSelect(SelectEntity):
unique_id: str,
name: str,
icon: str,
device_class: str | None,
current_option: str | None,
options: list[str],
translation_key: str,
) -> None:
"""Initialize the Demo select entity."""
self._attr_unique_id = unique_id
self._attr_name = name or DEVICE_DEFAULT_NAME
self._attr_current_option = current_option
self._attr_icon = icon
self._attr_device_class = device_class
self._attr_options = options
self._attr_translation_key = translation_key
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, unique_id)},
name=name,

View File

@ -63,6 +63,15 @@
}
},
"entity": {
"select": {
"speed": {
"state": {
"light_speed": "Light Speed",
"ludicrous_speed": "Ludicrous Speed",
"ridiculous_speed": "Ridiculous Speed"
}
}
},
"sensor": {
"thermostat_mode": {
"state": {

View File

@ -1,9 +0,0 @@
{
"state": {
"demo__speed": {
"light_speed": "Light Speed",
"ludicrous_speed": "Ludicrous Speed",
"ridiculous_speed": "Ridiculous Speed"
}
}
}

View File

@ -1,5 +1,14 @@
{
"entity": {
"select": {
"speed": {
"state": {
"light_speed": "Light Speed",
"ludicrous_speed": "Ludicrous Speed",
"ridiculous_speed": "Ridiculous Speed"
}
}
},
"sensor": {
"thermostat_mode": {
"state": {
@ -27,7 +36,8 @@
"fix_flow": {
"abort": {
"not_tea_time": "Can not re-heat the tea at this time"
}
},
"step": {}
},
"title": "The tea is cold"
},
@ -53,6 +63,9 @@
},
"options": {
"step": {
"init": {
"data": {}
},
"options_1": {
"data": {
"bool": "Optional boolean",