From 5ea6e752954c5d9881a11ad85d7ea1ed8790f63c Mon Sep 17 00:00:00 2001 From: Julian Pawlowski Date: Mon, 1 Jun 2026 11:16:21 +0000 Subject: [PATCH] refactor(services): change step value to 'any' for plan_charging fields Updated the step value for number fields in the plan_charging service to allow any value instead of a fixed increment. This change enhances flexibility in user input. Impact: Users can now specify any value within the defined range for charging plans. --- refactor(translations): update error message formatting for entity attributes Modified the error messages in multiple translation files to remove curly braces around entity attributes. This improves consistency in message formatting across languages. Impact: Users will see cleaner error messages when attributes are not found. --- custom_components/tibber_prices/services.yaml | 4 ++-- custom_components/tibber_prices/translations/de.json | 2 +- custom_components/tibber_prices/translations/en.json | 2 +- custom_components/tibber_prices/translations/nb.json | 2 +- custom_components/tibber_prices/translations/nl.json | 2 +- custom_components/tibber_prices/translations/sv.json | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/custom_components/tibber_prices/services.yaml b/custom_components/tibber_prices/services.yaml index 1c14203..aed2d85 100644 --- a/custom_components/tibber_prices/services.yaml +++ b/custom_components/tibber_prices/services.yaml @@ -1460,7 +1460,7 @@ plan_charging: number: min: 0 max: 100000 - step: 0.0001 + step: any mode: box reserve_for_discharge: required: false @@ -1474,7 +1474,7 @@ plan_charging: number: min: 0 max: 100000 - step: 0.0001 + step: any mode: box output: collapsed: true diff --git a/custom_components/tibber_prices/translations/de.json b/custom_components/tibber_prices/translations/de.json index 4dffeb1..c5c2e7a 100644 --- a/custom_components/tibber_prices/translations/de.json +++ b/custom_components/tibber_prices/translations/de.json @@ -1304,7 +1304,7 @@ "message": "Entity '{entity_id}' nicht gefunden. Überprüfe, ob die Entity existiert und verfügbar ist." }, "entity_attribute_not_found": { - "message": "Entity '{entity_id}' hat kein Attribut '{attribute}'." + "message": "Entity {entity_id} hat kein Attribut {attribute}." }, "entity_state_unavailable": { "message": "Entity '{entity_id}' hat den Status '{state}'. Die Entity muss einen gültigen Statuswert haben." diff --git a/custom_components/tibber_prices/translations/en.json b/custom_components/tibber_prices/translations/en.json index 95a8e42..5698930 100644 --- a/custom_components/tibber_prices/translations/en.json +++ b/custom_components/tibber_prices/translations/en.json @@ -1304,7 +1304,7 @@ "message": "Entity '{entity_id}' not found. Verify the entity exists and is available." }, "entity_attribute_not_found": { - "message": "Entity '{entity_id}' does not have attribute '{attribute}'." + "message": "Entity {entity_id} does not have attribute {attribute}." }, "entity_state_unavailable": { "message": "Entity '{entity_id}' state is '{state}'. The entity must have a valid state value." diff --git a/custom_components/tibber_prices/translations/nb.json b/custom_components/tibber_prices/translations/nb.json index b060723..1cffe2e 100644 --- a/custom_components/tibber_prices/translations/nb.json +++ b/custom_components/tibber_prices/translations/nb.json @@ -1304,7 +1304,7 @@ "message": "Entitet '{entity_id}' ble ikke funnet. Kontroller at entiteten finnes og er tilgjengelig." }, "entity_attribute_not_found": { - "message": "Entitet '{entity_id}' har ikke attributtet '{attribute}'." + "message": "Entitet {entity_id} har ikke attributtet {attribute}." }, "entity_state_unavailable": { "message": "Entitet '{entity_id}' har tilstanden '{state}'. Entiteten må ha en gyldig tilstandsverdi." diff --git a/custom_components/tibber_prices/translations/nl.json b/custom_components/tibber_prices/translations/nl.json index b78e932..6a4bb19 100644 --- a/custom_components/tibber_prices/translations/nl.json +++ b/custom_components/tibber_prices/translations/nl.json @@ -1304,7 +1304,7 @@ "message": "Entiteit '{entity_id}' niet gevonden. Controleer of de entiteit bestaat en beschikbaar is." }, "entity_attribute_not_found": { - "message": "Entiteit '{entity_id}' heeft geen attribuut '{attribute}'." + "message": "Entiteit {entity_id} heeft geen attribuut {attribute}." }, "entity_state_unavailable": { "message": "Entiteit '{entity_id}' heeft status '{state}'. De entiteit moet een geldige statuswaarde hebben." diff --git a/custom_components/tibber_prices/translations/sv.json b/custom_components/tibber_prices/translations/sv.json index f8cfac3..798bbd1 100644 --- a/custom_components/tibber_prices/translations/sv.json +++ b/custom_components/tibber_prices/translations/sv.json @@ -1304,7 +1304,7 @@ "message": "Entitet '{entity_id}' hittades inte. Kontrollera att entiteten finns och är tillgänglig." }, "entity_attribute_not_found": { - "message": "Entitet '{entity_id}' har inte attributet '{attribute}'." + "message": "Entitet {entity_id} har inte attributet {attribute}." }, "entity_state_unavailable": { "message": "Entitet '{entity_id}' har tillståndet '{state}'. Entiteten måste ha ett giltigt tillståndsvärde."