home-assistant/automations/ac_peak_ends.yaml
jm 1e3c1001d0 Harden AC rules with workday+weather fallbacks (v2)
Replace the three live AC automations in place (same ids -> same entity_ids,
continuous history/traces):

* pre-cool & peak-setback: the workday check moves out of a blocking
  `condition` into template logic that falls back to a plain Mon-Fri test when
  binary_sensor.workday_sensor is unavailable/unknown. Previously a dead sensor
  silently skipped the run.
* pre-cool: weather.get_forecasts now uses continue_on_error, and a
  `fc is defined and is mapping` guard falls back to an assumed 88F high (->70F
  regular pre-cool) when the forecast hard-errors or returns nothing.
* peak-ends: unchanged behavior (runs daily), documented only.

Add AUTOMATIONS.md (identity model, per-rule spec, failure-mode table, deploy
steps) and deploy.py (pushes automations/*.yaml to the HA config API by id).

Fallbacks verified empirically against the live automations via execution
traces before this commit. Also removed throwaway server-side debug automations
(three TEST spoofs + the ac_flap_1758_1820 experiment).

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

29 lines
1.1 KiB
YAML

# ac_peak_ends — end of the utility peak, return the house to comfort
#
# id / entity : ac_peak_ends -> automation.ac_peak_ends_return_to_74
# trigger : 19:00 local (America/New_York), EVERY day
# purpose : Return the thermostat to 74F after the peak window.
#
# Runs daily on purpose (no workday gate): you always want comfort back in the
# evening, weekend or holiday included. It has no external dependencies (no
# weather, no workday sensor), so there is nothing to fall back on — it is a
# plain, robust setpoint write.
#
# v2 (2026-07-09): no behavior change; documented + version-controlled.
id: ac_peak_ends
alias: AC - Peak ends, return to 74
description: >-
v2 (2026-07-09). At 7pm every day, returns the thermostat to 74F after the
peak window. Intentionally runs daily (no workday gate) and has no external
dependencies. Managed in git; see AUTOMATIONS.md.
mode: single
triggers:
- trigger: time
at: "19:00:00"
conditions: []
actions:
- action: climate.set_temperature
target:
entity_id: climate.t6_pro_z_wave_programmable_thermostat_with_smartstart
data:
temperature: 74