From 18524eec61a6ff7dd11285cb7fd246bdacea1e1b Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Tue, 22 Aug 2023 12:24:34 -0400 Subject: [PATCH] Add a few things for dangerously hot days, for use in Node-RED --- packages/climate.yaml | 5 +++++ packages/custom_weather.yaml | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/packages/climate.yaml b/packages/climate.yaml index 12bd035..2f8ca03 100644 --- a/packages/climate.yaml +++ b/packages/climate.yaml @@ -95,6 +95,11 @@ input_boolean: name: Hot Day icon: mdi:heat-wave + # Activated (manually) to immediately put all climate devices into their best cooling configurations + meltdown_protocol: + name: Meltdown Protocol + icon: mdi:skull-crossbones + # Activated if the day will be excessively cold. For use with automations for daytime climate control. cold_day: name: Cold Day diff --git a/packages/custom_weather.yaml b/packages/custom_weather.yaml index 6a08e43..af9fa40 100644 --- a/packages/custom_weather.yaml +++ b/packages/custom_weather.yaml @@ -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 }}"