diff --git a/CHANGELOG.md b/CHANGELOG.md index 535af40cc..c281ccff7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ Versions from 0.40 and up +## Ongoing + +- Implement translation for added homeassistantError raise message via PR [#948](https://github.com/plugwise/plugwise-beta/pull/948) + ## v0.60.0 - New Feature: add support for Anna P1 via plugwise [v1.9.0](https://github.com/plugwise/python-plugwise/releases/tag/v1.9.0) diff --git a/custom_components/plugwise/climate.py b/custom_components/plugwise/climate.py index b8246530c..1aa76921c 100644 --- a/custom_components/plugwise/climate.py +++ b/custom_components/plugwise/climate.py @@ -54,7 +54,7 @@ from .entity import PlugwiseEntity from .util import plugwise_command -ERROR_NO_SCHEDULE = "Failed setting HVACMode, set a schedule first" +ERROR_NO_SCHEDULE = "set_schedule_first" PARALLEL_UPDATES = 0 @@ -331,7 +331,10 @@ async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None: # Enabling HVACMode.AUTO requires a previously set schedule for saving and restoring if hvac_mode == HVACMode.AUTO and not desired: - raise HomeAssistantError(ERROR_NO_SCHEDULE) + raise HomeAssistantError( + translation_domain=DOMAIN, + translation_key=ERROR_NO_SCHEDULE, + ) await self.coordinator.api.set_schedule_state( self._location, diff --git a/custom_components/plugwise/strings.json b/custom_components/plugwise/strings.json index fca1df7fa..c18a84a4d 100644 --- a/custom_components/plugwise/strings.json +++ b/custom_components/plugwise/strings.json @@ -318,6 +318,9 @@ "invalid_xml_data": { "message": "Invalid XML data, or error indication received from the Plugwise Adam/Smile/Stretch" }, + "set_schedule_first": { + "message": "Failed setting HVACMode, set a schedule first." + }, "unsupported_firmware": { "message": "Device with unsupported firmware" } diff --git a/custom_components/plugwise/translations/en.json b/custom_components/plugwise/translations/en.json index 46734d066..f02b2fbcc 100644 --- a/custom_components/plugwise/translations/en.json +++ b/custom_components/plugwise/translations/en.json @@ -301,6 +301,9 @@ "invalid_xml_data": { "message": "Invalid XML data, or error indication received from the Plugwise Adam/Smile/Stretch" }, + "set_schedule_first": { + "message": "Failed setting HVACMode, set a schedule first." + }, "unsupported_firmware": { "message": "Device with unsupported firmware" } diff --git a/custom_components/plugwise/translations/nl.json b/custom_components/plugwise/translations/nl.json index 9e67daea7..aabf035dd 100644 --- a/custom_components/plugwise/translations/nl.json +++ b/custom_components/plugwise/translations/nl.json @@ -18,6 +18,13 @@ }, "config": { "step": { + "reconfigure": { + "description": "Configuratie bijwerken voor {title}.", + "data": { + "host": "IP-adres", + "port": "Port nummer" + } + }, "user": { "title": "Installeer Plugwise Adam/Smile/Stretch", "description": "Van uw Plugwise apparaat voer in: (installeren kan tot 90s duren)", @@ -42,7 +49,9 @@ }, "abort": { "already_configured": "Dit apparaat is al geconfigureerd", - "anna_with_adam": "Zowel Anna als Adam gedetecteerd. Voeg alleen de Adam toe, niet de Anna" + "anna_with_adam": "Zowel Anna als Adam gedetecteerd. Voeg alleen de Adam toe, niet de Anna", + "not_the_same_smile": "Het ingestelde Smile ID matcht niet met het ID van het ingegeven IP adres.", + "reconfigure_successful": "Herconfigureren gelukt" } }, "entity": { @@ -291,6 +300,29 @@ } } }, + "exceptions": { + "authentication_failed": { + "message": "Ongeldige authenticatie" + }, + "data_incomplete_or_missing": { + "message": "Data niet compleet of niet beschikbaar." + }, + "error_communicating_with_api": { + "message": "Fout bij het communiceren met API: {error}." + }, + "failed_to_connect": { + "message": "Verbinden mislukt" + }, + "invalid_xml_data": { + "message": "Ongeldige XML data, of foutmelding ontvangen van de Plugwise Adam/Smile/Stretch" + }, + "set_schedule_first": { + "message": "Instellen van HVACMode mislukt, activeer eerst een thermostaat schema." + }, + "unsupported_firmware": { + "message": "Apparaat met niet-ondersteunde firmware" + } + }, "services": { "delete_notification": { "name": "Verwijder Plugwise notificatie",