From 942f8cfc99235c69d011d3bcf0c854c3cddaaf7d Mon Sep 17 00:00:00 2001 From: Mika <19797875+it-rec@users.noreply.github.com> Date: Sun, 16 Aug 2026 19:36:11 +0200 Subject: [PATCH 1/2] Translate inverter and battery status states The status sensors are already SensorDeviceClass.ENUM with options, and the integration ships translations for config flow and issues, but the entity states themselves were never translated: the UI shows the raw option, e.g. B_STATUS_PRESERVE_CHARGE. The plain text existed only as a status_text attribute, which is not visible on the device page. Give both status sensors a translation key and add the entity state strings for en and de. English reuses the wording already in DEVICE_STATUS_TEXT and BATTERY_STATUS_TEXT so there is only one set of terms. The state value itself is unchanged, so automations comparing against B_STATUS_* keep working; only the displayed text changes. Other languages are left out on purpose rather than machine translated; they fall back to English. --- .../solaredge_modbus_multi/sensor.py | 2 ++ .../translations/de.json | 29 +++++++++++++++++++ .../translations/en.json | 29 +++++++++++++++++++ 3 files changed, 60 insertions(+) diff --git a/custom_components/solaredge_modbus_multi/sensor.py b/custom_components/solaredge_modbus_multi/sensor.py index 37a98d26..006903f9 100644 --- a/custom_components/solaredge_modbus_multi/sensor.py +++ b/custom_components/solaredge_modbus_multi/sensor.py @@ -1329,6 +1329,7 @@ def name(self) -> str: class SolarEdgeInverterStatus(SolarEdgeStatusSensor): options = list(DEVICE_STATUS.values()) + _attr_translation_key = "inverter_status" @property def native_value(self): @@ -1364,6 +1365,7 @@ def extra_state_attributes(self): class SolarEdgeBatteryStatus(SolarEdgeStatusSensor): options = list(BATTERY_STATUS.values()) + _attr_translation_key = "battery_status" @property def native_value(self): diff --git a/custom_components/solaredge_modbus_multi/translations/de.json b/custom_components/solaredge_modbus_multi/translations/de.json index c69a5dac..1d07a307 100644 --- a/custom_components/solaredge_modbus_multi/translations/de.json +++ b/custom_components/solaredge_modbus_multi/translations/de.json @@ -143,5 +143,34 @@ "title": "Fortgeschrittene Leistungssteuerung Zeitlimit", "description": "Der Wechselrichter reagierte nicht beim Lesen von Daten für fortgeschrittene Stromversorgungssteuerungen." } + }, + "entity": { + "sensor": { + "inverter_status": { + "state": { + "I_STATUS_OFF": "Aus", + "I_STATUS_SLEEPING": "Ruhezustand (automatische Abschaltung)", + "I_STATUS_STARTING": "Netzprüfung", + "I_STATUS_MPPT": "Erzeugung", + "I_STATUS_THROTTLED": "Erzeugung (abgeregelt)", + "I_STATUS_SHUTTING_DOWN": "Herunterfahren", + "I_STATUS_FAULT": "Störung", + "I_STATUS_STANDBY": "Wartung" + } + }, + "battery_status": { + "state": { + "B_STATUS_OFF": "Aus", + "B_STATUS_STANDBY": "Bereitschaft", + "B_STATUS_INIT": "Initialisierung", + "B_STATUS_CHARGE": "Lädt", + "B_STATUS_DISCHARGE": "Entlädt", + "B_STATUS_FAULT": "Störung", + "B_STATUS_PRESERVE_CHARGE": "Ladung halten", + "B_STATUS_IDLE": "Leerlauf", + "B_STATUS_POWER_SAVING": "Energiesparmodus" + } + } + } } } diff --git a/custom_components/solaredge_modbus_multi/translations/en.json b/custom_components/solaredge_modbus_multi/translations/en.json index dc8caf8b..eaa9d948 100644 --- a/custom_components/solaredge_modbus_multi/translations/en.json +++ b/custom_components/solaredge_modbus_multi/translations/en.json @@ -142,5 +142,34 @@ "title": "Advanced Power Control Timeout", "description": "The inverter did not respond while reading data for Advanced Power Controls. These entities will be unavailable. Disable the Auto-Detect Additional Entities option if the inverter has trouble trying to read these sensors." } + }, + "entity": { + "sensor": { + "inverter_status": { + "state": { + "I_STATUS_OFF": "Off", + "I_STATUS_SLEEPING": "Sleeping (Auto-Shutdown)", + "I_STATUS_STARTING": "Grid Monitoring", + "I_STATUS_MPPT": "Production", + "I_STATUS_THROTTLED": "Production (Curtailed)", + "I_STATUS_SHUTTING_DOWN": "Shutting Down", + "I_STATUS_FAULT": "Fault", + "I_STATUS_STANDBY": "Maintenance" + } + }, + "battery_status": { + "state": { + "B_STATUS_OFF": "Off", + "B_STATUS_STANDBY": "Standby", + "B_STATUS_INIT": "Initializing", + "B_STATUS_CHARGE": "Charge", + "B_STATUS_DISCHARGE": "Discharge", + "B_STATUS_FAULT": "Fault", + "B_STATUS_PRESERVE_CHARGE": "Preserve Charge", + "B_STATUS_IDLE": "Idle", + "B_STATUS_POWER_SAVING": "Power Saving" + } + } + } } } From 2279ba6b718bf271aa6b4eec8a059a4c782d62d3 Mon Sep 17 00:00:00 2001 From: Mika <19797875+it-rec@users.noreply.github.com> Date: Mon, 17 Aug 2026 07:11:11 +0200 Subject: [PATCH 2/2] Add the remaining languages for the status states Fills in fr, it, nb, nl and pl so all shipped translation files carry the status states, as requested in review: translations are updated together rather than one language at a time. English reuses the wording already in DEVICE_STATUS_TEXT and BATTERY_STATUS_TEXT. I can verify en, de and fr myself; it, nb, nl and pl are my best effort from the English terms, so corrections from native speakers are welcome for those four. --- .../translations/fr.json | 29 +++++++++++++++++++ .../translations/it.json | 29 +++++++++++++++++++ .../translations/nb.json | 29 +++++++++++++++++++ .../translations/nl.json | 29 +++++++++++++++++++ .../translations/pl.json | 29 +++++++++++++++++++ 5 files changed, 145 insertions(+) diff --git a/custom_components/solaredge_modbus_multi/translations/fr.json b/custom_components/solaredge_modbus_multi/translations/fr.json index fa90df9d..b8c41331 100644 --- a/custom_components/solaredge_modbus_multi/translations/fr.json +++ b/custom_components/solaredge_modbus_multi/translations/fr.json @@ -143,5 +143,34 @@ "title": "Timeout de contrôle de puissance avancé", "description": "L'onduleur n'a pas répondu lors de la lecture des données pour les contrôles de puissance avancés." } + }, + "entity": { + "sensor": { + "inverter_status": { + "state": { + "I_STATUS_OFF": "Arrêt", + "I_STATUS_SLEEPING": "Veille (arrêt automatique)", + "I_STATUS_STARTING": "Surveillance du réseau", + "I_STATUS_MPPT": "Production", + "I_STATUS_THROTTLED": "Production (limitée)", + "I_STATUS_SHUTTING_DOWN": "Arrêt en cours", + "I_STATUS_FAULT": "Défaut", + "I_STATUS_STANDBY": "Maintenance" + } + }, + "battery_status": { + "state": { + "B_STATUS_OFF": "Arrêt", + "B_STATUS_STANDBY": "Veille", + "B_STATUS_INIT": "Initialisation", + "B_STATUS_CHARGE": "Charge", + "B_STATUS_DISCHARGE": "Décharge", + "B_STATUS_FAULT": "Défaut", + "B_STATUS_PRESERVE_CHARGE": "Maintien de charge", + "B_STATUS_IDLE": "Inactif", + "B_STATUS_POWER_SAVING": "Économie d'énergie" + } + } + } } } diff --git a/custom_components/solaredge_modbus_multi/translations/it.json b/custom_components/solaredge_modbus_multi/translations/it.json index 1bea5d9b..f7c0dfc9 100644 --- a/custom_components/solaredge_modbus_multi/translations/it.json +++ b/custom_components/solaredge_modbus_multi/translations/it.json @@ -143,5 +143,34 @@ "title": "Timeout di controllo del potere avanzato", "description": "L'inverter non ha risposto durante la lettura dei dati per i controlli di potenza avanzati." } + }, + "entity": { + "sensor": { + "inverter_status": { + "state": { + "I_STATUS_OFF": "Spento", + "I_STATUS_SLEEPING": "Standby (spegnimento automatico)", + "I_STATUS_STARTING": "Monitoraggio della rete", + "I_STATUS_MPPT": "Produzione", + "I_STATUS_THROTTLED": "Produzione (limitata)", + "I_STATUS_SHUTTING_DOWN": "Arresto in corso", + "I_STATUS_FAULT": "Guasto", + "I_STATUS_STANDBY": "Manutenzione" + } + }, + "battery_status": { + "state": { + "B_STATUS_OFF": "Spento", + "B_STATUS_STANDBY": "Standby", + "B_STATUS_INIT": "Inizializzazione", + "B_STATUS_CHARGE": "Carica", + "B_STATUS_DISCHARGE": "Scarica", + "B_STATUS_FAULT": "Guasto", + "B_STATUS_PRESERVE_CHARGE": "Mantenimento della carica", + "B_STATUS_IDLE": "Inattivo", + "B_STATUS_POWER_SAVING": "Risparmio energetico" + } + } + } } } diff --git a/custom_components/solaredge_modbus_multi/translations/nb.json b/custom_components/solaredge_modbus_multi/translations/nb.json index 5db95d89..316d7802 100644 --- a/custom_components/solaredge_modbus_multi/translations/nb.json +++ b/custom_components/solaredge_modbus_multi/translations/nb.json @@ -143,5 +143,34 @@ "title": "Avansert timeout for strømkontroll", "description": "Omformeren svarte ikke mens du leste data for avanserte strømkontroller." } + }, + "entity": { + "sensor": { + "inverter_status": { + "state": { + "I_STATUS_OFF": "Av", + "I_STATUS_SLEEPING": "Hvilemodus (automatisk avslåing)", + "I_STATUS_STARTING": "Nettovervåking", + "I_STATUS_MPPT": "Produksjon", + "I_STATUS_THROTTLED": "Produksjon (begrenset)", + "I_STATUS_SHUTTING_DOWN": "Slår av", + "I_STATUS_FAULT": "Feil", + "I_STATUS_STANDBY": "Vedlikehold" + } + }, + "battery_status": { + "state": { + "B_STATUS_OFF": "Av", + "B_STATUS_STANDBY": "Hvilemodus", + "B_STATUS_INIT": "Initialiserer", + "B_STATUS_CHARGE": "Lader", + "B_STATUS_DISCHARGE": "Utlader", + "B_STATUS_FAULT": "Feil", + "B_STATUS_PRESERVE_CHARGE": "Bevarer ladning", + "B_STATUS_IDLE": "Inaktiv", + "B_STATUS_POWER_SAVING": "Strømsparing" + } + } + } } } diff --git a/custom_components/solaredge_modbus_multi/translations/nl.json b/custom_components/solaredge_modbus_multi/translations/nl.json index 007d7a1a..0000977a 100644 --- a/custom_components/solaredge_modbus_multi/translations/nl.json +++ b/custom_components/solaredge_modbus_multi/translations/nl.json @@ -143,5 +143,34 @@ "title": "Geavanceerde time -out voor stroomregeling", "description": "De omvormer reageerde niet tijdens het lezen van gegevens voor geavanceerde stroomregeling." } + }, + "entity": { + "sensor": { + "inverter_status": { + "state": { + "I_STATUS_OFF": "Uit", + "I_STATUS_SLEEPING": "Slaapstand (automatisch uitschakelen)", + "I_STATUS_STARTING": "Netbewaking", + "I_STATUS_MPPT": "Productie", + "I_STATUS_THROTTLED": "Productie (beperkt)", + "I_STATUS_SHUTTING_DOWN": "Afsluiten", + "I_STATUS_FAULT": "Storing", + "I_STATUS_STANDBY": "Onderhoud" + } + }, + "battery_status": { + "state": { + "B_STATUS_OFF": "Uit", + "B_STATUS_STANDBY": "Stand-by", + "B_STATUS_INIT": "Initialiseren", + "B_STATUS_CHARGE": "Laden", + "B_STATUS_DISCHARGE": "Ontladen", + "B_STATUS_FAULT": "Storing", + "B_STATUS_PRESERVE_CHARGE": "Lading behouden", + "B_STATUS_IDLE": "Inactief", + "B_STATUS_POWER_SAVING": "Energiebesparing" + } + } + } } } diff --git a/custom_components/solaredge_modbus_multi/translations/pl.json b/custom_components/solaredge_modbus_multi/translations/pl.json index 790a4e53..cdc7e0fc 100644 --- a/custom_components/solaredge_modbus_multi/translations/pl.json +++ b/custom_components/solaredge_modbus_multi/translations/pl.json @@ -143,5 +143,34 @@ "title": "Zaawansowany limit czasu kontroli mocy", "description": "Falownik nie zareagował podczas czytania danych pod kątem zaawansowanych kontroli mocy." } + }, + "entity": { + "sensor": { + "inverter_status": { + "state": { + "I_STATUS_OFF": "Wyłączony", + "I_STATUS_SLEEPING": "Czuwanie (automatyczne wyłączenie)", + "I_STATUS_STARTING": "Monitorowanie sieci", + "I_STATUS_MPPT": "Produkcja", + "I_STATUS_THROTTLED": "Produkcja (ograniczona)", + "I_STATUS_SHUTTING_DOWN": "Wyłączanie", + "I_STATUS_FAULT": "Awaria", + "I_STATUS_STANDBY": "Konserwacja" + } + }, + "battery_status": { + "state": { + "B_STATUS_OFF": "Wyłączony", + "B_STATUS_STANDBY": "Czuwanie", + "B_STATUS_INIT": "Inicjalizacja", + "B_STATUS_CHARGE": "Ładowanie", + "B_STATUS_DISCHARGE": "Rozładowywanie", + "B_STATUS_FAULT": "Awaria", + "B_STATUS_PRESERVE_CHARGE": "Utrzymanie ładunku", + "B_STATUS_IDLE": "Bezczynny", + "B_STATUS_POWER_SAVING": "Oszczędzanie energii" + } + } + } } }