diff --git a/custom_components/tibber_prices/custom_translations/de.json b/custom_components/tibber_prices/custom_translations/de.json index a697d34..455b2be 100644 --- a/custom_components/tibber_prices/custom_translations/de.json +++ b/custom_components/tibber_prices/custom_translations/de.json @@ -2,6 +2,7 @@ "apexcharts": { "title_rating_level": "Preisphasen Tagesverlauf", "title_level": "Preisniveau", + "hourly_suffix": "(Ø stündlich)", "best_price_period_name": "Bestpreis-Zeitraum", "peak_price_period_name": "Spitzenpreis-Zeitraum", "notification": { diff --git a/custom_components/tibber_prices/custom_translations/en.json b/custom_components/tibber_prices/custom_translations/en.json index a100578..f860318 100644 --- a/custom_components/tibber_prices/custom_translations/en.json +++ b/custom_components/tibber_prices/custom_translations/en.json @@ -2,6 +2,7 @@ "apexcharts": { "title_rating_level": "Price Phases Daily Progress", "title_level": "Price Level", + "hourly_suffix": "(Ø hourly)", "best_price_period_name": "Best Price Period", "peak_price_period_name": "Peak Price Period", "notification": { diff --git a/custom_components/tibber_prices/custom_translations/nb.json b/custom_components/tibber_prices/custom_translations/nb.json index 2e5403a..836265e 100644 --- a/custom_components/tibber_prices/custom_translations/nb.json +++ b/custom_components/tibber_prices/custom_translations/nb.json @@ -2,6 +2,7 @@ "apexcharts": { "title_rating_level": "Prisfaser dagsfremdrift", "title_level": "Prisnivå", + "hourly_suffix": "(Ø per time)", "best_price_period_name": "Beste prisperiode", "peak_price_period_name": "Toppprisperiode", "notification": { @@ -505,4 +506,4 @@ "now": "nå" }, "attribution": "Data levert av Tibber" -} \ No newline at end of file +} diff --git a/custom_components/tibber_prices/custom_translations/nl.json b/custom_components/tibber_prices/custom_translations/nl.json index cbaae35..1ee48b7 100644 --- a/custom_components/tibber_prices/custom_translations/nl.json +++ b/custom_components/tibber_prices/custom_translations/nl.json @@ -2,6 +2,7 @@ "apexcharts": { "title_rating_level": "Prijsfasen dagverloop", "title_level": "Prijsniveau", + "hourly_suffix": "(Ø per uur)", "best_price_period_name": "Beste prijsperiode", "peak_price_period_name": "Piekprijsperiode", "notification": { @@ -505,4 +506,4 @@ "now": "nu" }, "attribution": "Gegevens geleverd door Tibber" -} \ No newline at end of file +} diff --git a/custom_components/tibber_prices/custom_translations/sv.json b/custom_components/tibber_prices/custom_translations/sv.json index 6a80a93..5ea3e59 100644 --- a/custom_components/tibber_prices/custom_translations/sv.json +++ b/custom_components/tibber_prices/custom_translations/sv.json @@ -2,6 +2,7 @@ "apexcharts": { "title_rating_level": "Prisfaser dagsprogress", "title_level": "Prisnivå", + "hourly_suffix": "(Ø per timme)", "best_price_period_name": "Bästa prisperiod", "peak_price_period_name": "Toppprisperiod", "notification": { @@ -505,4 +506,4 @@ "now": "nu" }, "attribution": "Data tillhandahålls av Tibber" -} \ No newline at end of file +} diff --git a/custom_components/tibber_prices/services/get_apexcharts_yaml.py b/custom_components/tibber_prices/services/get_apexcharts_yaml.py index 0e18985..d5221b0 100644 --- a/custom_components/tibber_prices/services/get_apexcharts_yaml.py +++ b/custom_components/tibber_prices/services/get_apexcharts_yaml.py @@ -314,6 +314,10 @@ async def handle_apexcharts_yaml(call: ServiceCall) -> dict[str, Any]: # noqa: use_subunit = display_mode == DISPLAY_MODE_SUBUNIT price_unit = get_display_unit_string(config_entry, currency) + # Add average symbol suffix for hourly resolution (suffix to avoid confusion with øre/öre) + if resolution == "hourly": + price_unit = f"{price_unit} (Ø)" + # Get entity registry for mapping entity_registry = async_get_entity_registry(hass) @@ -532,6 +536,11 @@ async def handle_apexcharts_yaml(call: ServiceCall) -> dict[str, Any]: # noqa: day_translated = get_translation(["selector", "day", "options", day], user_language) or day.capitalize() title = f"{title} - {day_translated}" + # Add hourly suffix to title when using hourly resolution + if resolution == "hourly": + hourly_suffix = get_translation(["apexcharts", "hourly_suffix"], user_language) or "(Ø hourly)" + title = f"{title} {hourly_suffix}" + # Configure span based on selected day # For rolling window modes, use config-template-card for dynamic config if day == "yesterday":