Add a few things for dangerously hot days, for use in Node-RED

This commit is contained in:
2023-08-22 12:24:34 -04:00
parent a7df870757
commit 18524eec61
2 changed files with 16 additions and 0 deletions

View File

@ -235,6 +235,17 @@ template:
{% else %}
No Trigger
{% endif %}
danger: >
{% set day = states('sensor.today_corrected_high_temp') | int %}
{% set night = states('sensor.overnight_lowest_temperature') | int %}
{% set dayThreshold = states('input_number.extended_heat_threshold') | int + 10 %}
{% set nightThreshold = states('input_number.hot_overnight_threshold') | int + 10 %}
{% set hotDayThreshold = states('input_number.hot_day_threshold') | int + 5 %}
{% if (day >= dayThreshold and night >= nightThreshold) or day >= hotDayThreshold %}
Extreme
{% else %}
Normal
{% endif %}
- name: "Lightning Warning"
unique_id: edaddfc4-f7f0-4d75-aada-a2c588afe029
state: "{{ states('sensor.blitzortung_lightning_counter') | int > 0 }}"