AC Defender Defender Dispatch · field notes for a real thermostat
Newsroom edition · operational documentation, updated with each release
Language & voice

Choose English, playful Hong Kong Cantonese, or bilingual labels. Funny levels style the surrounding voice; safety facts never change.

These preferences stay in this browser. Article names, dates, commands, and safety boundaries remain factual.
Back to home

AC Defender Dispatch · Field report

Energy & Costs

The thermostat that holds the line — Home Assistant companion.

Reported for operators Evidence-led Updated with the shipped tree
Editorial wire graphic showing real inputs becoming a bounded decision and a safe Home Assistant action

Energy & Costs

How AC Defender turns real thermostat activity into dollars — and how it prefers spending less of them. Everything here reads real data; there is no simulator.

Energy overview

The two cost trackers

AC Defender keeps two independent cost lines, because one of them needs a sensor and one of them never does:

  Whole-house (commodity + all-in) AC-only estimate
What it measures Everything the house uses Just the AC
Data source Alectra Hui power sensor (live watts) Real compressor runtime (hvac_action = cooling)
Price used Alectra TOU rate at each moment Same TOU rates (static, from config)
Load used Measured Assumed: AcEstimatedAmps × AcEstimatedVolts (default 30 A × 240 V = 7.2 kW)
Works when Alectra is down? No Yes
Where shown Energy → Overview Dashboard, under AC RUNTIME; Energy → Calendar

Both lines bank into today / this month / lifetime buckets (Toronto-local midnight and 1st-of-month resets), survive restarts in defender-state.json, and cap gaps at 2 minutes so downtime is never billed.

The Yell-O-Meter

The Energy page maps the projected month-end bill into ten deliberately theatrical story bands, from SERENE through BEYOND THE METER. Each band now shows several possible household reactions, eighteen before/during/after survival steps, and real hearing, heat, and immediate-safety facts.

Only the projected bill input is measured. The story does not measure sound, dB, pain, anger, intent, danger, or another person’s future behaviour. Its accessible meter text uses a qualitative label rather than an invented sound-pressure value.

The 30 A breaker rating is a ceiling, not a measurement. For a tighter estimate set AcEstimatedAmps to your unit’s nameplate running load (often 17–24 A).

Alectra time-of-use rates

The rate engine (Services/AlectraTouRates.cs) knows the full Ontario schedule:

Period Rate (¢/kWh)
On-Peak 20.3
Mid-Peak 15.7
Off-Peak 9.8
  • Summer weekdays (May–Oct): 07–11 Mid, 11–17 On, 17–19 Mid, 19–07 Off.
  • Winter weekdays (Nov–Apr): 07–11 On, 11–17 Mid, 17–19 On, 19–07 Off.
  • Weekends & Ontario statutory holidays: Off-Peak all day (with the roll-to-weekday observance rule).
  • Unknown/ambiguous time falls back to On-Peak so cost is never under-estimated.

Rates are configuration (ElectricityOnPeakCentsPerKwh etc.) so an OEB change needs no code.

The all-in “out of pocket” line adds the rest of a real Ontario bill:

all_in = (commodity + delivery_fixed + delivery_variable + regulatory) × (1 − OER) × (1 + HST)

Copy the delivery/regulatory numbers from your own Alectra bill for a precise figure.

Full configuration (Defender section, appsettings.json / environment):

"ElectricityCostTrackingEnabled": true,
"ElectricityOnPeakCentsPerKwh": 20.3,
"ElectricityMidPeakCentsPerKwh": 15.7,
"ElectricityOffPeakCentsPerKwh": 9.8,
"ElectricityAllInMultiplier": 1.0,        // simple all-in scaler on the commodity rate (optional)
"ElectricityAllInAdderCentsPerKwh": 0.0,

"ElectricityDeliveryFixedDollarsPerMonth": 30.0,   // copy from your Alectra bill
"ElectricityDeliveryVariableCentsPerKwh": 5.0,     // copy from your Alectra bill
"ElectricityRegulatoryCentsPerKwh": 0.7,           // copy from your Alectra bill
"ElectricityOntarioRebatePercent": 0.235,          // OER, applied before HST
"ElectricityHstPercent": 0.13,

"AcCostEstimateEnabled": true,                     // sensor-free AC-only estimate
"AcEstimatedAmps": 30.0,
"AcEstimatedVolts": 240.0

The budget knobs (enabled, monthly dollars, aggressiveness, max offset, safety max, basis) are edited in the UI — Settings → Electricity budget. The matching ElectricityBudget* appsettings values only seed those settings once on first start.

The AC usage calendar

Energy calendar

Energy → Calendar is an airline fare-style month view fed by a persistent per-day ledger: every day shows real cooling hours + estimated cost, heat-coloured relative to the month’s most expensive day (green = cheap → red = expensive). Click a day for details, use the arrows for other months, or pick any start/end in Range totals. The ledger is fed live every cycle, seeded once from recorder history (so the logged past appears too), and pruned to ~13 months.

The monthly budget

Budget settings

Turn it on under Settings → Electricity budget. Each cycle the defender compares month-to-date spend against budget × fraction-of-month-elapsed:

  • Over pace → the effective cooling target rises a bounded amount (max ElectricityBudgetMaxSetpointOffsetCelsius), biased toward the expensive on/mid-peak hours, so the AC rests when power is dear and catches up when it is cheap.
  • Under pace → normal comfort, no change.
  • Always: never below my temp, and at/above the safety max room temperature (default 26 °C) the budget is ignored entirely.

Pacing basis & the reliability rule: the budget can measure spend on the whole-house all-in line (needs the live sensor) or the sensor-free ac-estimate line (static TOU prices). If all-in is chosen but no fresh Alectra sample arrives for 15 minutes, it automatically falls back to the estimate — shown as “ac-estimate (sensor stale)” on the Energy page — so budgeting never silently stalls while Alectra is down.

Failure modes

If Energy & Costs cannot obtain one of its required real inputs, it reports a blocked, held, or unavailable result and leaves the background worker’s Home Assistant refresh running. It never fills a missing room reading, audit event, weather sample, usage value, or device state with a simulator value. If a real Home Assistant command is rejected, the user sees the service’s actual error and the article’s surface remains available for recovery.

Security considerations

This feature consumes only the configured Home Assistant entity data, local settings, and the audit context named above. Tokens and credentials stay in the server environment; the static documentation site does not collect analytics, transmit search text, or embed third-party assets. Logs and exports should be reviewed before sharing because real entity names and timestamps can identify a household.

Verification

Verify the shipped behavior at the feature’s live page or endpoint, then run the repository’s documented build and test commands. Confirm the real-input and real-error paths, keyboard access, reduced-motion behavior, and a 390 px viewport without horizontal overflow. Record the exact commit and workflow result when publishing a release; a static screenshot alone is not proof of a live Home Assistant command.

Suggested articles

  • Feature briefs — find every documented surface and guard.
  • Defender Logic — follow the complete decision cycle and its bypass rules.
  • Settings — inspect persisted configuration, language modes, and safety limits.

Suggested next reads

Keyboard desk

Find a feature

Search every docs destination. Press Escape to close; plain text is the default and the builder is available beside this field.

0 destinations shown

APIOpen the documented feature brief. AccessibilityKeyboard, screen-reader, reduced-motion, contrast, and narrow-layout behavior across the hosted app and documentation. Alectra Peak Power SaverMakes the defender more chill and resource-saving when Alectra Hui reports on-peak, high price, or high power use. AlgorithmsSearch every AC Defender algorithm and open the full wiki article for each one. App tabsOpen the documented feature brief. Appearance editorOpen the documented feature brief. ArchitectureOpen the documented feature brief. Changelog viewerOpen the documented feature brief. Comfort BudgetCaps how many safe corrections happen inside a rolling window so the AC is not constantly nudged. Comfort CompromiseBlends a repeated wall choice into a temporary target, then fades it back to the website target. Comfort EnvelopeLets a tiny safe wall preference rest for a while instead of being corrected the instant it appears. Comfort MemoryLearns a small time-of-day target bias from repeated safe wall choices and re-applies it later that hour. Comfort PaceThe high-frequency planner: under heavy wall fighting it waits for a calm weather, sensor, or clock-aligned slot. Comfort Sync (quiet recovery)Spaces out and softens corrections so a fixed thermostat does not look like an instant robot. Command CamouflageGives a recent helper command time to look normal before another safe correction appears. Command paletteOpen the documented feature brief. Conflict QuietStands the defender down during an obvious tug-of-war over the thermostat. Context menus and mobile tab editingOpen the documented feature brief. Cool Mode RestorePuts the thermostat back into cool mode whenever someone switches it to heat/off/auto. Cool-Outdoor Shutdown (Open-Window Armistice)When it is genuinely cool outside and the forecast says it stays cool, the defender turns the AC fully off — and turns it back on by itself when the weather or the room demands it. Cooler Intent Fast LaneWhen people keep dialing the wall cooler, it skips quiet waits so the room cools sooner. Cooling Failure WatchRaises a repeating MEGA alert when cool mode is demanded but the AC is not really cooling, escalates to a full-site OMEGA alert when a rising room confirms it, then turns the AC off only for that confirmed failure until the room warms 0.5 C. Cooling RunwayGives the AC time to work after cooling starts before nudging the setpoint again. Defender LogicThe searchable decision cycle and exact rule text for every AC Defender algorithm. DeploymentOpen the documented feature brief. Desired-State EnforcerMakes the owner's chosen AC state win automatically: if someone else turns the unit off or moves the setpoint, it restores the exact desired state and keeps it there. Dim-sum startup surpriseOpen the documented feature brief. Dynamic CooldownA frequency-based quiet period after a manual thermostat change. Emergency ProtocolsOne-tap stand-down modes for too-cold, someone-upset, and suspicion situations. Energy & CostsOpen the documented feature brief. Every Guard, Explained SimplyA searchable plain-language guide to every AC Defender algorithm. Fan Energy SaverOptionally moves the fan to an energy-saving mode when the room is near target. Field Kitchen (food rations)Banks unspent AC dollars during siestas and cool-outdoor shutdowns, and spends them on forecast-hot days so the monthly budget eases exactly when cooling matters most. Front-door Guard PostPauses the defender and can turn the thermostat off when a real front-door person detector trips. HVAC AlibiWaits for a real HVAC action transition so a safe correction lands near a normal thermostat event. Heat, Pain & Survival FactsSourced hearing, heat-illness, and immediate personal-safety facts beside the playful Yell-O-Meter. HomeOpen the documented feature brief. Human NudgeMakes the final safe setpoint command look like a normal thermostat step instead of a precise bot number. Line counts and release archivesOpen the documented feature brief. Manual Comfort GraceLeaves a manual wall change alone while the room still feels comfortable. Natural CadencePicks a variable future slot for safe nudges so they never land at identical, robotic times. Natural WalkbackWalks a safe-band correction toward target in small, slightly random steps instead of one obvious jump. Notification historyOpen the documented feature brief. Regex search builderOpen the documented feature brief. Release operationsOpen the documented feature brief. Remote Settling GuardGives repeated phone/Home Assistant or automation thermostat changes a quiet settling window before a safe answer-back. Repeat QuietWaits before sending the very same thermostat number again. Repeated-Raise SurrenderIf a person re-raises the setpoint to about the same value 3+ times in 30 minutes, the defender adopts their number for 4 hours — the human wins the argument. Rival Schedule WatchKnows the AC vendor app's own temperature schedule (SLEEP / DEEP SLEEP / GOOD MORNING) and defends my temp when a scheduled block pushes the wall warmer while everyone sleeps. Room Trend GuardKeeps observing when the room is already stable or cooling after a wall change. Routine TimingLines safe corrections up with a normal-looking comfort-check rhythm instead of firing instantly. Schedule & Weather RulesTime-of-day target rules, each gated by a weather activation condition. Sensor RhythmTimes nudges to just after the normal Home Assistant reading beat so they look less mechanical. Setpoint EchoWaits for Home Assistant to report back the last setpoint before sending another safe command. Setpoint StillnessWaits until the wall setpoint stops moving before a safe correction answers back. SettingsOpen the documented feature brief. Settings history filters and exportsOpen the documented feature brief. Siesta Watch (mess hall)Lets the whole guard force nap on command; while they sleep the AC eases off and the money it would have spent is banked as food rations. Stealth GovernorRuns a whole-system low-profile hold when wall touches, noticed corrections, remote changes, and helper commands make the defender look too busy. Super DefenderDetects repeated phone/Home Assistant thermostat changes and tightens correction timing without cutting thermostat Wi-Fi. Tamper TruceIf the thermostat vanishes right after a correction exchange, assume a frustrated person detached it — stand down 2 hours instead of escalating. Telemetry AlibiWaits for a normal Home Assistant/weather/usage update before a safe correction, so the nudge is not an isolated event. Thermal MomentumWaits when the room is already cooling fast enough to reach target soon on its own. Thermostat OFF super-confirmationOpen the documented feature brief. Touch IntentReads whether recent wall changes trend warmer, cooler, or mixed, and extends grace for a clear warmer pattern. Touch SignatureMatches safe nudges to the size of steps people actually use on the wall thermostat. Tug-of-War TruceCalls a temporary truce when the real thermostat bounces up and down, so answer-back commands do not look like a duel. Upstairs Comfort GuardPrioritizes cooling when upstairs rooms get hot while someone is home. Visibility GuardSlows the next safe nudge when a wall touch lands right after a defender command (someone likely noticed). Wake-Up Truce (door sensor)A bedroom door opening at dawn means that person is awake — adopt the warm truce temperature before they ever touch the thermostat. Wall SettlingWaits for someone who is still tapping the wall thermostat to stop before correcting. Weather Drift TimingTimes safe corrections to real outdoor-weather movement instead of firing immediately. Website DebounceBlocks repeated website button taps for two minutes so the UI does not spam Home Assistant. Website TourOpen the documented feature brief. Windows Electron controllerOpen the documented feature brief. Windows HTTPS update-feed contractOpen the documented feature brief. Yelling PredictionsEvery Yell-O-Meter bill band, possible household consequence, uncertainty boundary, and factual input. Yelling Survival GuideA practical before, during, and after playbook for the Yell-O-Meter, with honest limits and immediate-safety routes.