feat: dry the kids' bathroom in the cheapest window after a shower #13

Merged
varl merged 1 commit from runa/hass:feat/bath-drying-cheap-hours into main 2026-11-08 00:29:28 +01:00
Member

Builds on #12 — merge that first. This branch contains #12's commit; review only the second one.

The kids shower at 18-20, the dearest hours, and their floor started drying at once. Now:

  • At engage, the latch picks the start within 4 h whose 3 h run has the lowest mean Nord Pool price (cheapest_start() in custom_templates/bathroom_drying.jinja), and stores it in input_datetime.bathroom_kids_drying_start.
  • The heating automations skip their drying branch until that start, so the floor follows price/time meanwhile.
  • Once started, the run holds 3 h before humidity may release it: a delayed run starts after the air has recovered, so humidity alone would end it at once while the grout is still wet. 3 h is the middle of the kids' humidity-released cycles, 1.7-4.1 h over 28 Oct-7 Nov. The 8 h cap counts from the start.
  • Master (showers 20-23, already in the cheap night) and guest (no showers) keep delay 0 and 45 min, which is today's behaviour. The start check is in all three heating automations so a delay set later cannot be half-wired.

What it is worth. On last week's prices, the six kids showers would have dried at 1.18 SEK/kWh less, the best start being 4 h later each time (e.g. Mon 18:02: 5.59 -> 4.17). At roughly 1 kWh a run, about 1.2 SEK a day.

Fails towards drying now: no price data, or none covering a whole run, or an unset start helper all mean dry at once.

Validated: just check-local passes. cheapest_start() rendered against sample prices: delays to the cheapest window that the data fully covers; no delay, no prices, flat prices, a window past the end of the data, and "cheapest is now" all return now. Not run live.

**Builds on #12 — merge that first.** This branch contains #12's commit; review only the second one. The kids shower at 18-20, the dearest hours, and their floor started drying at once. Now: - At engage, the latch picks the start within 4 h whose 3 h run has the lowest mean Nord Pool price (`cheapest_start()` in `custom_templates/bathroom_drying.jinja`), and stores it in `input_datetime.bathroom_kids_drying_start`. - The heating automations skip their drying branch until that start, so the floor follows price/time meanwhile. - Once started, the run holds 3 h before humidity may release it: a delayed run starts after the air has recovered, so humidity alone would end it at once while the grout is still wet. 3 h is the middle of the kids' humidity-released cycles, 1.7-4.1 h over 28 Oct-7 Nov. The 8 h cap counts from the start. - Master (showers 20-23, already in the cheap night) and guest (no showers) keep delay 0 and 45 min, which is today's behaviour. The start check is in all three heating automations so a delay set later cannot be half-wired. **What it is worth.** On last week's prices, the six kids showers would have dried at 1.18 SEK/kWh less, the best start being 4 h later each time (e.g. Mon 18:02: 5.59 -> 4.17). At roughly 1 kWh a run, about 1.2 SEK a day. **Fails towards drying now:** no price data, or none covering a whole run, or an unset start helper all mean dry at once. **Validated:** `just check-local` passes. `cheapest_start()` rendered against sample prices: delays to the cheapest window that the data fully covers; no delay, no prices, flat prices, a window past the end of the data, and "cheapest is now" all return now. Not run live.
feat: dry the kids' bathroom in the cheapest window after a shower
Some checks are pending
ci/woodpecker/pr/check Pipeline is pending approval
ci/woodpecker/push/check Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful
8f40dcdbd5
The kids shower at 18-20, the dearest hours, and drying started at once. Now
the latch picks, at engage, the start within 4 h whose 3 h run has the lowest
mean Nord Pool price, and holds the run 3 h from that start before humidity
may release it: by then the air has long recovered while the grout has not.
3 h is the middle of its humidity-released cycles (1.7-4.1 h, 28 Oct-7 Nov).
The 8 h cap counts from the start.

Until the run starts, the heating automations skip their drying branch and
the floor follows price/time as usual. Master (showers 20-23, already in the
cheap night) and guest (no showers) keep delay 0 and 45 min: unchanged.

On last week's prices the six kids showers would have dried at 1.18 SEK/kWh
less, the best start being 4 h later every time. No price data, or none
covering a whole run, dries at once as before.

Builds on the per-room latch fix; adds three input_datetimes.
varl merged commit 8f40dcdbd5 into main 2026-11-08 00:29:28 +01:00
varl deleted branch feat/bath-drying-cheap-hours 2026-11-08 00:29:28 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
meatbag/hass!13
No description provided.