Skip to content

feat: add Auto/Manual operating modes - #15

Merged
basmeerman merged 1 commit into
mainfrom
feat/operating-modes
Jun 28, 2026
Merged

basmeerman merged 1 commit into
mainfrom
feat/operating-modes

Conversation

@basmeerman

Copy link
Copy Markdown
Owner

Summary

Adds a second operating mode so the fan can be driven manually as well as by the temperature curve.

  • Operating Mode select — Auto / Manual (persisted, default Auto).
  • Auto — unchanged: 5-point temperature curve, clamped to Fan Min %.
  • Manual — Manual Fan switch (on/off) + Manual Fan Speed number (0–100 %, slider). Off forces 0 %.

Design

  • The resolved-speed template sensor (fan_speed_pct) now branches by mode and stays the single driver of the LEDC output, so Fan Speed always reflects the actual duty in both modes.
  • Mode/switch/speed changes trigger an immediate component.update so manual edits apply without the 1 s tick delay.

Safety (preserved in all modes)

NaN reading and the >60 s sensor-stall failsafe still force the fan to 100 % even in Manual. The temperature alarm stays indicator-only (unchanged).

Web UI note

The stock ESPHome web page can't hide entities by state, so the manual controls are always visible (inert in Auto). They're organised via web_server sorting groups. Per-mode conditional UI belongs in a Home Assistant dashboard keyed on Operating Mode.

Validation

  • esphome config ✅
  • esphome compile ✅
  • Docs: PROJECT_PLAN F7, CHANGELOG [Unreleased]/Added, README entity table + "Operating modes" section.

Post-merge: OTA to the device and verify Auto unchanged → Manual on/off + speed → confirm sensor-stall still forces 100 % in Manual.

🤖 Generated with Claude Code

Adds an Operating Mode select (Auto / Manual) alongside the existing
temperature-driven curve:

- Auto (default): unchanged 5-point fan curve, clamped to Fan Min %.
- Manual: Manual Fan switch (on/off) + Manual Fan Speed number (0-100 %);
  off forces 0 %.

The resolved-speed template sensor (fan_speed_pct) now branches by mode and
remains the single driver of the LEDC output, so "Fan Speed" always reflects
the actual duty applied. Safety failsafes are preserved and apply in ALL
modes: NaN read and >60 s sensor stall still force 100 %, including in Manual.
Temperature alarm stays indicator-only.

Mode + manual entities are grouped on the web UI via web_server sorting
groups. The stock web page can't hide entities by state, so the manual
controls are always shown but inert in Auto; per-mode UI belongs in a Home
Assistant dashboard. Docs updated: PROJECT_PLAN F7, CHANGELOG, README.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@basmeerman
basmeerman merged commit eecaf73 into main Jun 28, 2026
1 check passed
@basmeerman
basmeerman deleted the feat/operating-modes branch June 28, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant