Cleanup some old template binary sensors for weather
This commit is contained in:
@ -24,11 +24,7 @@ template:
|
|||||||
state: >
|
state: >
|
||||||
{% set temp = states('sensor.pirateweather_temperature') | int %}
|
{% set temp = states('sensor.pirateweather_temperature') | int %}
|
||||||
{% set threshold = states('input_number.hot_day_threshold') | int %}
|
{% set threshold = states('input_number.hot_day_threshold') | int %}
|
||||||
{% if temp >= threshold %}
|
{{ temp >= threshold }}
|
||||||
true
|
|
||||||
{% else %}
|
|
||||||
false
|
|
||||||
{% endif %}
|
|
||||||
device_class: heat
|
device_class: heat
|
||||||
attributes:
|
attributes:
|
||||||
current_temp: "{{ states('sensor.pirateweather_temperature') | int }}"
|
current_temp: "{{ states('sensor.pirateweather_temperature') | int }}"
|
||||||
@ -38,11 +34,7 @@ template:
|
|||||||
state: >
|
state: >
|
||||||
{% set feelslike = states('sensor.pirateweather_apparent_temperature') | int %}
|
{% set feelslike = states('sensor.pirateweather_apparent_temperature') | int %}
|
||||||
{% set threshold = states('input_number.heat_index_threshold') | int %}
|
{% set threshold = states('input_number.heat_index_threshold') | int %}
|
||||||
{% if feelslike >= threshold %}
|
{{ feelslike >= threshold }}
|
||||||
true
|
|
||||||
{% else %}
|
|
||||||
false
|
|
||||||
{% endif %}
|
|
||||||
device_class: heat
|
device_class: heat
|
||||||
attributes:
|
attributes:
|
||||||
current_temp: "{{ states('sensor.pirateweather_apparent_temperature') | int }}"
|
current_temp: "{{ states('sensor.pirateweather_apparent_temperature') | int }}"
|
||||||
@ -52,11 +44,7 @@ template:
|
|||||||
state: >
|
state: >
|
||||||
{% set temp = states('sensor.pirateweather_temperature') | int %}
|
{% set temp = states('sensor.pirateweather_temperature') | int %}
|
||||||
{% set threshold = states('input_number.cold_day_threshold') | int %}
|
{% set threshold = states('input_number.cold_day_threshold') | int %}
|
||||||
{% if temp <= threshold %}
|
{{ temp <= threshold }}
|
||||||
true
|
|
||||||
{% else %}
|
|
||||||
false
|
|
||||||
{% endif %}
|
|
||||||
device_class: cold
|
device_class: cold
|
||||||
attributes:
|
attributes:
|
||||||
current_temp: "{{ states('sensor.pirateweather_temperature') | int }}"
|
current_temp: "{{ states('sensor.pirateweather_temperature') | int }}"
|
||||||
@ -66,11 +54,7 @@ template:
|
|||||||
state: >
|
state: >
|
||||||
{% set temp = states('sensor.pirateweather_temperature') | int %}
|
{% set temp = states('sensor.pirateweather_temperature') | int %}
|
||||||
{% set threshold = states('input_number.overnight_low_threshold') | int%}
|
{% set threshold = states('input_number.overnight_low_threshold') | int%}
|
||||||
{% if temp <= threshold %}
|
{{ temp <= threshold }}
|
||||||
true
|
|
||||||
{% else %}
|
|
||||||
false
|
|
||||||
{% endif %}
|
|
||||||
device_class: cold
|
device_class: cold
|
||||||
attributes:
|
attributes:
|
||||||
current_temp: "{{ states('sensor.pirateweather_temperature') | int }}"
|
current_temp: "{{ states('sensor.pirateweather_temperature') | int }}"
|
||||||
@ -80,11 +64,7 @@ template:
|
|||||||
state: >
|
state: >
|
||||||
{% set feelslike = states('sensor.pirateweather_apparent_temperature') | int %}
|
{% set feelslike = states('sensor.pirateweather_apparent_temperature') | int %}
|
||||||
{% set threshold = states('input_number.wind_chill_threshold') | int %}
|
{% set threshold = states('input_number.wind_chill_threshold') | int %}
|
||||||
{% if feelslike <= threshold %}
|
{{ feelslike <= threshold }}
|
||||||
true
|
|
||||||
{% else %}
|
|
||||||
false
|
|
||||||
{% endif %}
|
|
||||||
device_class: cold
|
device_class: cold
|
||||||
attributes:
|
attributes:
|
||||||
current_temp: "{{ states('sensor.pirateweather_temperature') | int }}"
|
current_temp: "{{ states('sensor.pirateweather_temperature') | int }}"
|
||||||
|
Reference in New Issue
Block a user