Migrate Demo translations (#83294)
parent
aa4a0df194
commit
f801fe307e
|
@ -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,
|
||||
|
|
|
@ -63,6 +63,15 @@
|
|||
}
|
||||
},
|
||||
"entity": {
|
||||
"select": {
|
||||
"speed": {
|
||||
"state": {
|
||||
"light_speed": "Light Speed",
|
||||
"ludicrous_speed": "Ludicrous Speed",
|
||||
"ridiculous_speed": "Ridiculous Speed"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
"thermostat_mode": {
|
||||
"state": {
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"state": {
|
||||
"demo__speed": {
|
||||
"light_speed": "Light Speed",
|
||||
"ludicrous_speed": "Ludicrous Speed",
|
||||
"ridiculous_speed": "Ridiculous Speed"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue