home-assistant/automations/ac_precool_before_peak.yaml

69 lines
2.1 KiB
YAML
Raw Normal View History

# ac_precool_before_peak — imported live baseline (v1) on 2026-07-09
id: ac_precool_before_peak
alias: AC - Pre-cool before peak
description: ''
triggers:
- trigger: time
at: '12:00:00'
conditions:
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
actions:
- action: weather.get_forecasts
target:
entity_id: weather.forecast_4315aspenhill
data:
type: daily
response_variable: fc
- variables:
today_high: "{% set today = now().date() %} {% set entries = fc['weather.forecast_4315aspenhill'].forecast\n\
\ | selectattr('datetime')\n | list %}\n{% set match = entries\n | selectattr('datetime',\
\ 'search', today | string)\n | list %}\n{{ (match[0].temperature if match\
\ else entries[0].temperature) | float(0) }}\n"
- choose:
- conditions:
- condition: template
value_template: '{{ today_high >= 90 }}'
sequence:
- action: climate.set_hvac_mode
target:
entity_id: climate.t6_pro_z_wave_programmable_thermostat_with_smartstart
data:
hvac_mode: cool
- action: climate.set_temperature
target:
entity_id: climate.t6_pro_z_wave_programmable_thermostat_with_smartstart
data:
temperature: 68
- conditions:
- condition: template
value_template: '{{ today_high >= 85 }}'
sequence:
- action: climate.set_hvac_mode
target:
entity_id: climate.t6_pro_z_wave_programmable_thermostat_with_smartstart
data:
hvac_mode: cool
- action: climate.set_temperature
target:
entity_id: climate.t6_pro_z_wave_programmable_thermostat_with_smartstart
data:
temperature: 70
- conditions:
- condition: template
value_template: '{{ today_high >= 80 }}'
sequence:
- action: climate.set_hvac_mode
target:
entity_id: climate.t6_pro_z_wave_programmable_thermostat_with_smartstart
data:
hvac_mode: cool
- action: climate.set_temperature
target:
entity_id: climate.t6_pro_z_wave_programmable_thermostat_with_smartstart
data:
temperature: 71
default: []
mode: single