diff --git a/ReleaseNotes.md b/ReleaseNotes.md index cee6dc8..3d7b993 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -19,9 +19,9 @@ So at this release we concentrated on cleaning up de code everywhere and shave s Since in this update lots of input to the blueprint changed, we highly recommend you review your settings and make sure all fields have the correct selection. We did our best to support your legacy settings and avoid breaking your system, but please double check your settings if you see something not working as expected. ### Files that need to be reloaded: -1. nspanel_eu.tft, nspanel_us.tft or nspanel_us_land.tft - v4.1.2 -2. nspanel_esphome.yaml - v4.1.2 -3. nspanel_blueprint.yaml - v4.1.2 +1. nspanel_eu.tft, nspanel_us.tft or nspanel_us_land.tft - v4.1.4 +2. nspanel_esphome.yaml - v4.1.4 +3. nspanel_blueprint.yaml - v4.1.4 #### @@ -103,6 +103,8 @@ packages: - Upload TFT remove dependency to from ESPHome Nextion component - Fix light icon color on buttons - Fix climate page not updating properly +- 4.1.4 patch: + - Supports new `weather.get_forecasts` introduced by Home Assistant 2023.12.0   ## Details of noteworthy changes diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index 310252d..3a97779 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -33,7 +33,7 @@ blueprint: 🎉 Roadmap can be found here: [Roadmap](https://github.com/Blackymas/NSPanel_HA_Blueprint/labels/roadmap) - ℹ️ Version: v4.1.3 + ℹ️ Version: v4.1.4 source_url: https://github.com/Blackymas/NSPanel_HA_Blueprint/blob/main/nspanel_blueprint.yaml domain: automation @@ -3599,7 +3599,7 @@ trigger_variables: variables: ##### GENERAL ##### - blueprint_version: '4.1.3' + blueprint_version: '4.1.4' date_format_temp: !input 'date_format' #Avoid breaking change for existing users with legacy type format date_format: > @@ -8581,7 +8581,14 @@ action: - *delay-default ##### Display weather data only when available ##### - - service: weather.get_forecast + - variables: + ha_core_update_entity: > + {% for u in integration_entities("hassio") | select("search", "^update[.]") if (device_attr(u, "identifiers") | first)[1] == "core" %} + {{ u }} + {% endfor %} + ha_core_current_version: '{{ state_attr(ha_core_update_entity, "installed_version") }}' + use_new_forecasts: '{{ ha_core_current_version | version >= "2023.12.0b1" if ha_core_current_version else false }}' + - service: '{{ "weather.get_forecasts" if use_new_forecasts else "weather.get_forecast" }}' target: entity_id: '{{ weather_entity }}' data: @@ -8590,11 +8597,13 @@ action: continue_on_error: true - variables: forecast: > - {{ - service_response_var.forecast - if service_response_var is defined and service_response_var.forecast is defined - else state_attr(weather_entity, "forecast") | default(false) - }} + {% if use_new_forecasts and service_response_var is defined and service_response_var[weather_entity] is defined and service_response_var[weather_entity].forecast is defined %} + {{ service_response_var[weather_entity].forecast }} + {% elif service_response_var is defined and service_response_var.forecast is defined %} + {{ service_response_var.forecast }} + {% else %} + {{ state_attr(weather_entity, "forecast") | default(false) }} + {% endif %} - condition: '{{ forecast != false }}' - variables: datetime_is_string: '{{ forecast[0] is defined and forecast[0]["datetime"] is string }}'