From b5c278920c3c4496711522a9e037c2a7f0a9339e Mon Sep 17 00:00:00 2001 From: Julian Pawlowski Date: Sat, 24 May 2025 20:50:07 +0000 Subject: [PATCH] refactoring config flow --- .../tibber_prices/translations/de.json | 24 +++++++++++++++++++ .../tibber_prices/translations/en.json | 24 +++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/custom_components/tibber_prices/translations/de.json b/custom_components/tibber_prices/translations/de.json index db54500..b038441 100644 --- a/custom_components/tibber_prices/translations/de.json +++ b/custom_components/tibber_prices/translations/de.json @@ -31,6 +31,30 @@ "setup_complete": "Einrichtung abgeschlossen! Du kannst zusätzliche Optionen für Tibber Preise in den Integrationsoptionen ändern, nachdem du diesen Dialog geschlossen hast." } }, + "config_subentries": { + "home": { + "title": "Zuhause", + "step": { + "user": { + "title": "Tibber Zuhause hinzufügen", + "description": "Wähle ein Zuhause aus, das du zu deiner Tibber-Integration hinzufügen möchtest.", + "data": { + "home_id": "Zuhause" + } + } + }, + "error": { + "api_error": "Fehler beim Abrufen der Zuhause von der Tibber API" + }, + "abort": { + "no_parent_entry": "Übergeordneter Eintrag nicht gefunden", + "no_access_token": "Kein Zugriffstoken verfügbar", + "home_not_found": "Ausgewähltes Zuhause nicht gefunden", + "api_error": "Fehler beim Abrufen der Zuhause von der Tibber API", + "no_available_homes": "Keine weiteren Zuhause zum Hinzufügen verfügbar" + } + } + }, "options": { "step": { "init": { diff --git a/custom_components/tibber_prices/translations/en.json b/custom_components/tibber_prices/translations/en.json index 8b77cae..3ae316a 100644 --- a/custom_components/tibber_prices/translations/en.json +++ b/custom_components/tibber_prices/translations/en.json @@ -31,6 +31,30 @@ "setup_complete": "Setup complete! You can change additional options for Tibber Prices in the integration's options after closing this dialog." } }, + "config_subentries": { + "home": { + "title": "Home", + "step": { + "user": { + "title": "Add Tibber Home", + "description": "Select a home to add to your Tibber integration.", + "data": { + "home_id": "Home" + } + } + }, + "error": { + "api_error": "Failed to fetch homes from Tibber API" + }, + "abort": { + "no_parent_entry": "Parent entry not found", + "no_access_token": "No access token available", + "home_not_found": "Selected home not found", + "api_error": "Failed to fetch homes from Tibber API", + "no_available_homes": "No additional homes available to add" + } + } + }, "options": { "step": { "init": {