Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 5 additions & 2 deletions custom_components/plugwise/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions custom_components/plugwise/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
3 changes: 3 additions & 0 deletions custom_components/plugwise/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
34 changes: 33 additions & 1 deletion custom_components/plugwise/translations/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand All @@ -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": {
Expand Down Expand Up @@ -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",
Expand Down
Loading