From 4994d708c4d0b918b3f96c6822fa7cea418eb35c Mon Sep 17 00:00:00 2001 From: Bas Meerman <30606346+basmeerman@users.noreply.github.com> Date: Mon, 29 Jun 2026 06:17:12 +0200 Subject: [PATCH] feat: order web UI controls by mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a third web_server sorting group ("Auto settings") and assign sorting_weight so the control fields render top-to-bottom as: 1. Operation — Operating Mode 2. Manual control — Manual Fan, Manual Fan Speed 3. Auto settings — Fan Min %, Alarm Temperature, Fan PWM Frequency Setting Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 8 +++++--- fancontrol.yaml | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7fe853..93b1de9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,9 +17,11 @@ Release notes for each tagged version are extracted from this file by the number. A single resolved-speed template sensor drives the PWM in both modes, so `Fan Speed` always reflects the actual duty. Safety failsafes (NaN read, >60 s sensor stall → 100 %) still apply in **all** modes, including Manual. - Mode + manual controls are grouped on the web UI via `web_server` - sorting groups (the stock UI can't hide entities by state, so they are shown - but inert in Auto). + Controls are ordered on the web UI via `web_server` sorting groups — + **Operation** (Operating Mode) → **Manual control** (Manual Fan, Manual Fan + Speed) → **Auto settings** (Fan Min %, Alarm Temperature, PWM Frequency). The + stock UI can't hide entities by state, so all are shown but inert in the + inactive mode. ### Changed - Home Assistant transport switched from the native ESPHome **`api:` to diff --git a/fancontrol.yaml b/fancontrol.yaml index 8b46223..9d983ec 100644 --- a/fancontrol.yaml +++ b/fancontrol.yaml @@ -100,6 +100,9 @@ web_server: - id: group_manual name: "Manual control" sorting_weight: 20 + - id: group_auto + name: "Auto settings" + sorting_weight: 30 # -------- Globals (restore_value = persisted across reboots) -------- @@ -254,6 +257,7 @@ switch: icon: mdi:fan web_server: sorting_group_id: group_manual + sorting_weight: 10 optimistic: true restore_mode: RESTORE_DEFAULT_OFF # Only takes effect in Manual mode; inert in Auto. @@ -270,6 +274,7 @@ number: id: manual_fan_speed web_server: sorting_group_id: group_manual + sorting_weight: 20 min_value: 0 max_value: 100 step: 1 @@ -285,6 +290,9 @@ number: - platform: template name: "Alarm Temperature" id: alarm_temp_threshold + web_server: + sorting_group_id: group_auto + sorting_weight: 20 min_value: 0 max_value: 80 step: 1 @@ -297,6 +305,9 @@ number: - platform: template name: "Fan Min %" id: fan_min_pct + web_server: + sorting_group_id: group_auto + sorting_weight: 10 min_value: 0 max_value: 100 step: 1 @@ -309,6 +320,9 @@ number: - platform: template name: "Fan PWM Frequency Setting" id: fan_pwm_freq_setting + web_server: + sorting_group_id: group_auto + sorting_weight: 30 min_value: 1000 max_value: 5000 step: 100