home-assistant/automations/ac_winter_morning_kill.yaml
jm 7a0d75d9db Add TOU winter peak-shaving; parameterize by season (v3)
Pepco MD TOU-P has different on-peak windows by season: summer (Jun-Sep)
14:00-19:00, winter (Oct-May) 06:00-09:00 and 17:00-21:00. Heat is gas, so
winter electric peak logic is cooling-only.

* pre-cool: bounded to summer (Jun-Sep); winter has no pre-cool.
* peak-setback (hold) and peak-ends (return): unified across seasons via a
  season self-select (month -> season; triggers carry id: summer/winter and act
  only when trigger.id == season) plus a params map for setpoints. Summer forces
  cool + 82 / returns 74 daily; winter sets 82 / returns 74 ONLY when already in
  cool mode, so it never disturbs the gas furnace.
* new ac_winter_morning_kill: 06:00 winter work days, if in cool mode set
  hvac_mode off to dodge the 6-9am winter peak. No auto-resume yet (planned).

Decision logic verified as a truth table via the template engine across
summer/winter x cooling x workday before commit. Deployed in place (existing
ids unchanged); new id ac_winter_morning_kill added.

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

43 lines
1.8 KiB
YAML

# ac_winter_morning_kill — stop the AC at the winter morning on-peak start
#
# id / entity : ac_winter_morning_kill -> automation.ac_winter_morning_kill
# trigger : 06:00 local (America/New_York)
# purpose : Winter has a 6-9 AM on-peak. If the AC is running at 6am, stop
# it. (Rare — only the mild May/October days when AC runs.)
#
# Cooling-only and gas-heat-safe: only acts when the thermostat is in `cool`
# mode, so it never turns off the gas furnace. Turns the unit fully OFF (per the
# chosen "stop" behavior). There is intentionally NO auto-resume yet — a resume
# automation can be added later.
#
# Fallback: workday sensor unavailable -> Mon-Fri (weekends/holidays are
# off-peak, so no kill then).
#
# v3 (2026-07-09): new.
id: ac_winter_morning_kill
alias: AC - Winter morning peak kill
description: >-
v3 (2026-07-09). At 6am on winter (Oct-May) work days, turns the thermostat
OFF if it is currently cooling, to avoid the 6-9am winter on-peak. Cooling-only
(never touches gas heat). No auto-resume yet. Managed in git; see
AUTOMATIONS.md.
mode: single
triggers:
- trigger: time
at: "06:00:00"
id: winter
conditions: []
actions:
- variables:
season: "{{ 'summer' if now().month in [6,7,8,9] else 'winter' }}"
is_workday: "{% set wd = states('binary_sensor.workday_sensor') %}{% if wd in ['on','off'] %}{{ wd == 'on' }}{% else %}{{ now().weekday() < 5 }}{% endif %}"
cooling: "{{ is_state('climate.t6_pro_z_wave_programmable_thermostat_with_smartstart','cool') }}"
- if:
- condition: template
value_template: "{{ season == 'winter' and is_workday and cooling }}"
then:
- action: climate.set_hvac_mode
target:
entity_id: climate.t6_pro_z_wave_programmable_thermostat_with_smartstart
data:
hvac_mode: "off"