home-assistant/automations/ac_precool_before_peak.yaml
jm cfb3520ef7 Import live AC automations (v1 baseline)
Snapshot of the three AC peak-shaving automations exactly as they run on the
HA server today, imported via the config API, plus deploy tooling. This is the
baseline the v2 hardening diffs against.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-09 21:01:08 -04:00

68 lines
2.1 KiB
YAML

# 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