Skip to content

Your home as a live 3D model in the Mac menu bar and on iPhone — lights and ACs via Smart Life, Home Assistant, Philips Hue and Apple Home.

Climate: an AC that is on but idle shows as idle, not running (#14)

0xProbability1ed3e3c35b12
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 240439d..7dd8113 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,12 @@ What changed in each release of House Control. The Mac app is on
your Mac. It is the app's entry under System Settings → General → Login Items, so it can be switched off there too.
Run from the disk image, the app asks to be moved to Applications first; moved there later, the login item follows it.
+### Home Assistant
+
+- **A thermostat that is on but not running shows as idle.** When the room is already warm (or cool) enough, Home
+ Assistant reports `hvac_action: idle`; the 3D unit then stops blowing air and its tile and island chip are outlined
+ with "Idle" instead of lit as if it were heating.
+
## 1.0.0 — 2026-10-15
### Widgets, controls and quick actions
diff --git a/core/Sources/HouseCore/HomeAssistantService.swift b/core/Sources/HouseCore/HomeAssistantService.swift
index 5f07de4..1dd2304 100644
--- a/core/Sources/HouseCore/HomeAssistantService.swift
+++ b/core/Sources/HouseCore/HomeAssistantService.swift
@@ -233,6 +233,9 @@ public final class HomeAssistantService: DeviceService {
} else if id.hasPrefix("climate.") {
let modes = modeTable(attributes["hvac_modes"] as? [String] ?? [])
var ac: [String: Any] = ["on": value != "off"]
+ // On, but not running right now: a thermostat whose room is already warm (or cool) enough.
+ let action = attributes["hvac_action"] as? String
+ ac["idle"] = value != "off" && (action == "idle" || action == "off")
if let mode = modes.first(where: { $0.value == value })?.key { ac["mode"] = mode }
if let t = attributes.double("temperature") {
ac["target"] = t
diff --git a/core/Tests/HouseCoreTests/ServiceTests.swift b/core/Tests/HouseCoreTests/ServiceTests.swift
index fbac9c1..c3e483d 100644
--- a/core/Tests/HouseCoreTests/ServiceTests.swift
+++ b/core/Tests/HouseCoreTests/ServiceTests.swift
@@ -81,10 +81,21 @@ final class ServiceTests: XCTestCase {
XCTAssertEqual(reading.ac?["fan"] as? String, "high")
XCTAssertEqual(reading.ac?["swing"] as? String, "off")
XCTAssertEqual(reading.ac?["eco"] as? Bool, true)
+ XCTAssertEqual(reading.ac?["idle"] as? Bool, false)
XCTAssertEqual(reading.features?["modes"] as? [String], ["cool", "heat", "dry", "fan", "auto"])
XCTAssertEqual(reading.features?["fans"] as? [String], ["low", "high"])
XCTAssertEqual(reading.features?["eco"] as? Bool, true)
XCTAssertEqual(reading.features?["sleep"] as? Bool, false)
+ // A thermostat that is on but whose room is already warm enough is idle, not heating.
+ func idle(_ state: String, _ action: String?) -> Bool? {
+ var attributes: [String: Any] = ["hvac_modes": ["off", "heat"], "temperature": 21]
+ attributes["hvac_action"] = action
+ return HomeAssistantService.reading(from: ["entity_id": "climate.heater", "state": state, "attributes": attributes]).ac?["idle"] as? Bool
+ }
+ XCTAssertEqual(idle("heat", "idle"), true)
+ XCTAssertEqual(idle("heat", "heating"), false)
+ XCTAssertEqual(idle("heat", nil), false)
+ XCTAssertEqual(idle("off", "off"), false)
// A heat_cool-only thermostat reports a range instead of one set-point.
let range = HomeAssistantService.reading(from: [
"entity_id": "climate.ecobee", "state": "heat_cool",
diff --git a/web/src/island/island.css b/web/src/island/island.css
index 7aa9bcf..c6c3144 100644
--- a/web/src/island/island.css
+++ b/web/src/island/island.css
@@ -243,6 +243,9 @@ html.mode-island #app { display: block; padding: 0; height: 100%; }
.chip.ac:not(.on) .chip-value { color: var(--faint); }
.chip-power { border-radius: 50%; margin-left: 2px; background: rgba(255, 255, 255, 0.1); }
.chip.ac.on .chip-power { background: var(--c); color: #06162c; box-shadow: 0 0 14px -4px var(--c); }
+/* On but not running: outlined in the mode's colour instead of lit with it. */
+.chip.ac.on.idle { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.06); box-shadow: none; }
+.chip.ac.on.idle .chip-bubble, .chip.ac.on.idle .chip-power { background: transparent; color: var(--c); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 70%, transparent); }
/* ---------- arriving ---------- */
diff --git a/web/src/island/island.js b/web/src/island/island.js
index 0e355a0..b0d47f5 100644
--- a/web/src/island/island.js
+++ b/web/src/island/island.js
@@ -92,10 +92,11 @@ export async function bootIsland(root) {
rows.push(() => {
const s = state.acs[cfg.id];
el.classList.toggle('on', s.on);
+ el.classList.toggle('idle', s.on && s.idle);
el.style.setProperty('--c', MODE_COLORS[s.mode]);
if (shownMode !== s.mode) { bubble.replaceChildren(icon(s.mode, 15)); shownMode = s.mode; }
value.textContent = `${s.target}°`;
- sub.textContent = `${s.on ? MODE_LABEL[s.mode] : 'Off'} · ${s.roomTemp.toFixed(0)}° inside`;
+ sub.textContent = `${!s.on ? 'Off' : s.idle ? 'Idle' : MODE_LABEL[s.mode]} · ${s.roomTemp.toFixed(0)}° inside`;
});
}
diff --git a/web/src/store.js b/web/src/store.js
index 0cb5877..afb95b0 100644
--- a/web/src/store.js
+++ b/web/src/store.js
@@ -16,6 +16,8 @@ function defaultAC(cfg, outdoor) {
return {
on: false, target: 24, mode: 'cool', fan: 'auto', swing: 'swing',
sleep: false, eco: false, roomTemp: Math.min(outdoor - 2, 27),
+ // On but not running right now (a real thermostat says so); never sent to a device.
+ idle: false,
};
}
@@ -145,11 +147,13 @@ export function createStore(config) {
if (!cur) return false;
const clean = { ...patch };
if ('target' in clean) clean.target = clamp(Math.round(clean.target), cfg.min, cfg.max);
+ // Switched on here: running until the thermostat says otherwise at the next poll.
+ if (!remote && clean.on === true && !cur.on) clean.idle = false;
const diff = Object.fromEntries(Object.entries(clean).filter(([k, v]) => cur[k] !== v));
if (!Object.keys(diff).length) return false;
const before = Object.fromEntries(Object.keys(diff).map((k) => [k, cur[k]]));
Object.assign(cur, clean);
- const { roomTemp, ...sendable } = diff;
+ const { roomTemp, idle, ...sendable } = diff;
if (!remote && Object.keys(sendable).length) dispatch('ac', id, sendable, before);
return true;
}
diff --git a/web/src/style.css b/web/src/style.css
index 00c809e..018bee5 100644
--- a/web/src/style.css
+++ b/web/src/style.css
@@ -451,6 +451,9 @@ html.native .card { width: auto; height: auto; box-shadow:
@media (hover: hover) { .mini-power:hover { background: rgba(255, 255, 255, 0.16); color: var(--text); } }
.mini-power:active { transform: scale(0.88); }
.tile.ac.on .mini-power { background: var(--c); color: #06162c; box-shadow: 0 0 18px -4px var(--c); }
+/* On but not running: outlined in the mode's colour instead of lit with it. */
+.tile.ac.on.idle { background: var(--glass); border-color: var(--line); box-shadow: none; }
+.tile.ac.on.idle .bubble, .tile.ac.on.idle .mini-power { background: transparent; color: var(--c); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 70%, transparent); }
.tile:focus-visible { outline: none; border-color: rgba(120, 175, 255, 0.8); }
diff --git a/web/src/three/ac.js b/web/src/three/ac.js
index 1713b30..265e7d8 100644
--- a/web/src/three/ac.js
+++ b/web/src/three/ac.js
@@ -105,7 +105,7 @@ export class ACUnit {
}
apply(state, { instant = false } = {}) {
- this.goal = state.on ? 1 : 0;
+ this.goal = state.on && !state.idle ? 1 : 0;
this.goalColor.set(MODE_COLORS[state.mode] || MODE_COLORS.cool);
this.speed = FAN_SPEED[state.fan] ?? FAN_SPEED.auto;
if (state.sleep) this.speed *= 0.6;
diff --git a/web/src/ui/panel.js b/web/src/ui/panel.js
index b04df4f..eb3ad24 100644
--- a/web/src/ui/panel.js
+++ b/web/src/ui/panel.js
@@ -227,10 +227,11 @@ export function createPanel(root, config, store, { onFocus, onMenu }) {
update() {
const s = state.acs[cfg.id];
el.classList.toggle('on', s.on);
+ el.classList.toggle('idle', s.on && s.idle);
el.style.setProperty('--c', MODE_COLORS[s.mode]);
if (shownMode !== s.mode) { bubble.replaceChildren(icon(s.mode, 19)); shownMode = s.mode; }
value.textContent = `${s.target}°`;
- sub.textContent = `${s.on ? MODE_LABEL[s.mode] : 'Off'} · Room ${s.roomTemp.toFixed(isPhone ? 0 : 1)}°`;
+ sub.textContent = `${!s.on ? 'Off' : s.idle ? 'Idle' : MODE_LABEL[s.mode]} · Room ${s.roomTemp.toFixed(isPhone ? 0 : 1)}°`;
},
};
}
@@ -392,7 +393,7 @@ export function createPanel(root, config, store, { onFocus, onMenu }) {
options.style.gridTemplateColumns = `repeat(${shown.filter(([, on]) => on).length || 1}, 1fr)`;
powerBtn.classList.toggle('on', a.on);
sub.replaceChildren(icon('thermo', 14), 'Room ', h('b', `${a.roomTemp.toFixed(1)}°C`),
- h('span.live', { style: { background: a.on ? MODE_COLORS[a.mode] : 'rgba(255,255,255,.25)', boxShadow: a.on ? `0 0 8px ${MODE_COLORS[a.mode]}` : 'none' } }));
+ h('span.live', { style: { background: a.on ? MODE_COLORS[a.mode] : 'rgba(255,255,255,.25)', boxShadow: a.on && !a.idle ? `0 0 8px ${MODE_COLORS[a.mode]}` : 'none' } }));
big.set(a.target, !a.on);
slider.set(a.target);
eco.classList.toggle('on', a.eco);
@@ -480,7 +481,7 @@ export function createPanel(root, config, store, { onFocus, onMenu }) {
} else {
const cfg = store.acCfg.get(hit.id);
const s = state.acs[hit.id];
- name = cfg.name; status = s.on ? `${MODE_LABEL[s.mode]} ${s.target}°` : 'Off'; on = s.on; color = MODE_COLORS[s.mode];
+ name = cfg.name; status = s.on ? `${s.idle ? 'Idle' : MODE_LABEL[s.mode]} ${s.target}°` : 'Off'; on = s.on && !s.idle; color = MODE_COLORS[s.mode];
}
tooltip.replaceChildren(h('i.dot'), name, h('span', status));
tooltip.classList.toggle('on', on);