Remove old workaround for high temps, Pirateweather fixed the issue

This commit is contained in:
2024-04-30 12:52:16 -04:00
parent 4a9afaf009
commit fae9129712
5 changed files with 17 additions and 80 deletions

View File

@ -2351,33 +2351,6 @@
entity_id: input_boolean.audible_notifications
data: {}
mode: restart
- id: '1696288503650'
alias: Fix High Temperature
description: Gotta make up for one of a few shortcomings in Pirateweather
trigger:
- platform: time_pattern
minutes: /5
condition:
- condition: time
before: '18:00:00'
action:
- service: input_number.set_value
target:
entity_id: input_number.today_corrected_high_temp
data:
value: '{{ states(''sensor.todays_high_temp'') | int }}'
alias: Update corrected high temp for today
- if:
- condition: time
after: 06:10:00
then:
- service: input_number.set_value
data:
value: '{{ states(''sensor.tomorrow_s_high_temp'') | int }}'
target:
entity_id: input_number.tomorrow_corrected_high_temp
alias: If after 6:10am, also update high temp for tomorrow
mode: single
- id: '1696288846954'
alias: Tony Meds Handler
description: Make sure Tony has taken his meds at the scheduled times
@ -2682,11 +2655,6 @@
- input_boolean.skip_disarm
- input_boolean.skip_rearm
data: {}
- service: input_number.set_value
data:
value: '{{ states(''input_number.tomorrow_corrected_high_temp'') | int }}'
target:
entity_id: input_number.today_corrected_high_temp
- service: counter.reset
target:
entity_id:

View File

@ -10,7 +10,7 @@
{% endif %}
{% if type in ['forecast','full'] %}
{% if 14400 <= ct <= 61200 %}
The forecast high is {{ states('sensor.today_corrected_high_temp') }}.
The forecast high is {{ states('sensor.todays_high_temp') }}.
{% else %}
Overnight you can expect a low of {{ states('sensor.overnight_lowest_temperature') }}.
{% endif %}

View File

@ -362,7 +362,7 @@ template:
- name: Heat Warning
unique_id: 02b8020a-4fa1-4489-abea-bfadf82ec7e5
state: >
{% set day = states('sensor.today_corrected_high_temp') | int %}
{% set day = states('sensor.todays_high_temp') | int %}
{% set night = states('sensor.overnight_lowest_temperature') | int %}
{% set dayThreshold = states('input_number.extended_heat_threshold') | int %}
{% set nightThreshold = states('input_number.hot_overnight_threshold') | int %}
@ -371,7 +371,7 @@ template:
device_class: heat
attributes:
trigger: >
{% set day = states('sensor.today_corrected_high_temp') | int %}
{% set day = states('sensor.todays_high_temp') | int %}
{% set night = states('sensor.overnight_lowest_temperature') | int %}
{% set dayThreshold = states('input_number.extended_heat_threshold') | int %}
{% set nightThreshold = states('input_number.hot_overnight_threshold') | int %}
@ -384,7 +384,7 @@ template:
No Trigger
{% endif %}
danger: >
{% set day = states('sensor.today_corrected_high_temp') | int %}
{% set day = states('sensor.todays_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 %}
@ -487,7 +487,7 @@ template:
'Later Today ',
'For the rest of the day '
] | random }}
expect a high of {{ states('sensor.today_corrected_high_temp') }}
expect a high of {{ states('sensor.todays_high_temp') }}
{%- if states('sensor.current_forecast') == 'sunny' and is_state('binary_sensor.night','off')%}
{{ [
'and sunny. ',
@ -798,7 +798,7 @@ template:
'Later Today ',
'For the rest of the day '
] | random }}
expect a high of {{ states('sensor.today_corrected_high_temp') }}
expect a high of {{ states('sensor.todays_high_temp') }}
{%- if states('sensor.current_forecast') == 'sunny' and is_state('binary_sensor.night','off')%}
{{ [
'and sunny. ',
@ -930,22 +930,22 @@ template:
unique_id: 8ed2684b-d0ad-402c-bc3c-340cb9b2437a
state: >-
{% if is_state('binary_sensor.overnight', 'off') %}
{% set temp = states('sensor.today_corrected_high_temp')|int %}
{% set temp = states('sensor.todays_high_temp')|int %}
{% else %}
{% set temp = state_attr('weather.iron_nerd_weather_station','temperature')|round %}
{% endif %}
{%- if states('sensor.today_corrected_high_temp')|int > 63 %}
{%- if states('sensor.today_corrected_high_temp')|int < 80 %}
{%- if states('sensor.todays_high_temp')|int > 63 %}
{%- if states('sensor.todays_high_temp')|int < 80 %}
Nice
{% elif states('sensor.today_corrected_high_temp')|int > 90 %}
{% elif states('sensor.todays_high_temp')|int > 90 %}
Hot
{% else %}
Toasty
{%- endif %}
{% elif states('sensor.today_corrected_high_temp')|int < 64 %}
{%- if states('sensor.today_corrected_high_temp')|int < 32 %}
{% elif states('sensor.todays_high_temp')|int < 64 %}
{%- if states('sensor.todays_high_temp')|int < 32 %}
Freezing
{% elif states('sensor.today_corrected_high_temp')|int > 48 %}
{% elif states('sensor.todays_high_temp')|int > 48 %}
Chilly
{% else %}
Cold
@ -1198,37 +1198,6 @@ template:
{% endfor %}
{{ ns.temps | min | int }}
icon: mdi:thermometer
- name: 'Today Corrected High Temp'
unique_id: c0c40ec1-605e-4739-a935-ac0a2937fab2
unit_of_measurement: °F
state: "{{ states('input_number.today_corrected_high_temp') | int }}"
icon: mdi:thermometer-high
input_number:
today_corrected_high_temp:
name: Today Corrected High Temp
min: -100
max: 150
step: 1
unit_of_measurement: °F
icon: mdi:thermometer
mode: box
today_corrected_low_temp:
name: Today Corrected Low Temp
min: -100
max: 150
step: 1
unit_of_measurement: °F
icon: mdi:thermometer
mode: box
tomorrow_corrected_high_temp:
name: Tomorrow Corrected High Temp
min: -150
max: 100
step: 1
unit_of_measurement: °F
icon: mdi:thermometer
mode: box
input_boolean:
freeze_warning:

View File

@ -494,7 +494,7 @@ script:
entity_id: input_boolean.hot_day
- if:
- condition: template
value_template: "{{ states('sensor.today_corrected_high_temp') | int <= states('input_number.cold_day_threshold') | int }}"
value_template: "{{ states('sensor.todays_high_temp') | int <= states('input_number.cold_day_threshold') | int }}"
then:
- service: input_boolean.turn_on
target:
@ -619,7 +619,7 @@ script:
data:
time: >
{% set low = states('sensor.overnight_lowest_temperature') | int %}
{% set high = states('sensor.today_corrected_high_temp') | int %}
{% set high = states('sensor.todays_high_temp') | int %}
{% if low > 60 or is_state('input_boolean.hot_day','on') %}
22:30
{% elif 50 <= low <= 60 %}
@ -700,7 +700,7 @@ script:
entity_id: input_datetime.emma_bedtime
data:
time: >
{% set high = states('sensor.today_corrected_high_temp') | int %}
{% set high = states('sensor.todays_high_temp') | int %}
{% set low = states('sensor.overnight_lowest_temperature') | int %}
{% if is_state('input_boolean.hot_day','on') %}
22:00

View File

@ -49,7 +49,7 @@
{% endif %}
</p>
<p>
Today the high temperature will be {{ states('sensor.today_corrected_high_temp') }} degrees.
Today the high temperature will be {{ states('sensor.todays_high_temp') }} degrees.
{{ states('sensor.clothing_forecast_detail') }}
</p>