After spending quite some time struggling to work out how to get the days forecast high temperature using OpenWeather I finally realised if I use Accuweather they have a min and max for each daily forecast!
I’ve now managed to automate the timings for our old storage heaters based on the days max temp. The automation switches on the fused spur at a certain time. Not sure if I’ve got the timings quite right yet, will need a little tweaking!
alias: Upstairs SH Timings
description: Upstairs SH Timings using Local Tuya and weather forecast
trigger:
- platform: time
at: "01:30:00"
condition: []
action:
- choose:
- conditions:
- condition: numeric_state
entity_id: sensor.home_realfeel_temperature_max_0d
above: -20
below: 5
sequence:
- delay:
hours: 1
minutes: 11
seconds: 0
milliseconds: 0
- service: homeassistant.turn_on
data: {}
target:
entity_id: switch.localtuya_upstairs_sh_group
- conditions:
- condition: numeric_state
entity_id: sensor.home_realfeel_temperature_max_0d
above: 4.9
below: 10
sequence:
- delay:
hours: 2
minutes: 11
seconds: 0
milliseconds: 0
- service: homeassistant.turn_on
data: {}
target:
entity_id: switch.localtuya_upstairs_sh_group
- conditions:
- condition: numeric_state
entity_id: sensor.home_realfeel_temperature_max_0d
above: 9.9
below: 13
sequence:
- delay:
hours: 3
minutes: 11
seconds: 0
milliseconds: 0
- service: homeassistant.turn_on
data: {}
target:
entity_id: switch.localtuya_upstairs_sh_group
- conditions:
- condition: numeric_state
entity_id: sensor.home_realfeel_temperature_max_0d
above: 12.9
below: 15
sequence:
- delay:
hours: 4
minutes: 11
seconds: 0
milliseconds: 0
- service: homeassistant.turn_on
data: {}
target:
entity_id: switch.localtuya_upstairs_sh_group
mode: single