From 4a346ce2d28f12d360e726f44899d5560cbab7f5 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Tue, 4 Apr 2023 07:11:43 +0200 Subject: [PATCH] Change order of weather params to fit the screen (#592) --- nspanel_blueprint.yaml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/nspanel_blueprint.yaml b/nspanel_blueprint.yaml index 8d59817..9c1cf87 100644 --- a/nspanel_blueprint.yaml +++ b/nspanel_blueprint.yaml @@ -6020,18 +6020,21 @@ action: {{ state_attr(weather.entity,'forecast')[page_index].thunderstorm_probability | default('unknown') }} {% endif %} parameters: - - name: precipitation_probability - visibility: "{{ is_number(precipitation_probability) }}" - value: "{{ (precipitation_probability | round(0) ~ weather.units.precipitation_probability) if is_number(precipitation_probability) }}" - icon: "{{ nextion.icons.weather.rain }}" - - name: precipitation - visibility: "{{ is_number(precipitation) }}" - value: "{{ (precipitation | round(0) ~ ' ' ~ weather.units.precipitation) if is_number(precipitation) }}" - icon: "{{ nextion.icons.weather.rain }}" - name: hours_of_sun visibility: "{{ is_number(hours_of_sun) }}" value: "{{ (hours_of_sun | round(0) ~ ' ' ~ weather.units.hours_of_sun) if is_number(hours_of_sun) }}" icon: "{{ nextion.icons.weather.sun }}" + - name: thunderstorm_probability + visibility: "{{ is_number(thunderstorm_probability) }}" + value: "{{ (thunderstorm_probability | round(0) ~ weather.units.thunderstorm_probability) if is_number(thunderstorm_probability) }}" + icon: "{{ nextion.icons.weather.lightning }}" + - name: precipitation + visibility: "{{ is_number(precipitation) or is_number(precipitation_probability) }}" + value: > + {{ (precipitation | round(0) ~ ' ' ~ weather.units.precipitation) if is_number(precipitation) }} + {{ '-' if is_number(precipitation) and is_number(precipitation_probability) }} + {{ (precipitation_probability | round(0) ~ weather.units.precipitation_probability) if is_number(precipitation_probability) }} + icon: "{{ nextion.icons.weather.rain }}" - name: uv_index visibility: "{{ is_number(uv_index) }}" value: > @@ -6042,10 +6045,6 @@ action: visibility: "{{ is_number(wind_speed) }}" value: "{{ (wind_speed | round(0) ~ ' ' ~ weather.units.wind_speed) if is_number(wind_speed) }}" icon: "{{ nextion.icons.weather.wind }}" - - name: thunderstorm_probability - visibility: "{{ is_number(thunderstorm_probability) }}" - value: "{{ (thunderstorm_probability | round(0) ~ weather.units.thunderstorm_probability) if is_number(thunderstorm_probability) }}" - icon: "{{ nextion.icons.weather.lightning }}" ##### SET weather PIC on Home Page #### - service: "{{ command_printf }}"