Remove + from positive temperatures (#624)

This commit is contained in:
Edward Firmo
2023-04-06 00:14:10 +02:00
committed by GitHub
parent 84c9f073bd
commit 124b9d87d5

View File

@@ -4962,7 +4962,7 @@ action:
temperature_string: >
{{ (temp_min | round(0) ~ weather_units.temperature) if is_number(temp_min) }}
{{ '/' if is_number(temp_min) and is_number(temp_max) }}
{{ (('+' if temp_min | float(1) <= 0 and temp_max | float(-1) > 0) ~ temp_max | round(0) ~ weather_units.temperature) if is_number(temp_max) }}
{{ (temp_max | round(0) ~ weather_units.temperature) if is_number(temp_max) }}
- if: "{{ (is_number(temp_min) or is_number(temp_max)) and temperature_string is string and temperature_string | length > 0 }}"
then:
- service: "{{ nextion.commands.text_printf }}"