Skip to content

Commit

Permalink
Fix state translations for new format #469
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Apr 4, 2024
1 parent dd5f9d2 commit f4f6772
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
18 changes: 18 additions & 0 deletions custom_components/yandex_station/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,23 @@
}
}
}
},
"entity": {
"water_heater": {
"kettle": {
"state": {
"off": "Выключено",
"on": "Включено",
"white_tea": "Белый чай",
"green_tea": "Зеленый чай",
"red_tea": "Красный чай",
"herbal_tea": "Травяной чай",
"flower_tea": "Цветочный чай",
"puerh_tea": "Чай пуэр",
"oolong_tea": "Чай улун",
"black_tea": "Черный чай"
}
}
}
}
}
16 changes: 0 additions & 16 deletions custom_components/yandex_station/translations/water_heater.en.json

This file was deleted.

1 change: 1 addition & 0 deletions custom_components/yandex_station/water_heater.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ async def async_setup_entry(hass, entry, async_add_entities):
# noinspection PyAbstractClass
class YandexKettle(WaterHeaterEntity, YandexEntity):
_attr_temperature_unit = UnitOfTemperature.CELSIUS
_attr_translation_key = "kettle"

def internal_init(self, capabilities: dict, properties: dict):
self._attr_operation_list = ["on", "off"] if "on" in capabilities else []
Expand Down

0 comments on commit f4f6772

Please sign in to comment.