You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: four defects found by the portfolio audit (serial leak, dead entity gate, solar wipe, Off revert) (#35)
Security — diagnostics leaked the appliance serial four times over. POINTTAPI
writes it to address, device_id and uuid (config_flow), none of which were in
TO_REDACT_CONFIG; and _redact_path_response looked for a top-level "uuid" key
that real {"id": ..., "value": ...} responses never carry, so /gateway/uuid's
value went out in the clear too. The existing test only exercised the key shape
that never occurs in live data, which is why this read as covered.
Local-path entities were all disabled by default. Five platforms gated
entity_registry_enabled_default on an opt-in list read from the config entry;
no code has ever written those keys, in any released version, and the options
flow writes to entry.options rather than entry.data. A fresh XMPP install
therefore showed climate + water_heater and hid everything else. Noisy
telemetry is already demoted through entity_category, so the gate bought
nothing. Existing installs are untouched — the default only applies to newly
registered entities.
Solar removal ran on unreliable input. An absent /solarCircuits key deleted the
solar device and every entity registry entry on it, but the coordinator
silently skips paths that fail, so one timeout during startup destroyed a
solar user's entity ids, customisations and history association with no way
back. Skipping the descriptions stays unconditional (harmless, reversible);
only the deletion now requires a refresh that succeeded and returned data.
Off -> Heat reverted within one poll. Off is stored as manual mode at min_temp;
setting Heat wrote only userMode, leaving the setpoint at 5 C, so the next
coordinator update re-ran the is_off detection and flipped the card back. The
pre-Off setpoint is captured on the way in and restored on the way out.
Also: the test harness stubbed custom_components.bosch.sensor as an empty shell
module, which made its async_setup_entry unimportable and is why the sensor
platform sat at 0%. It is imported for real now; no test needed changing.
__init__.py takes SWITCH from const rather than re-exporting it through the
switch platform.
574 tests pass, ruff clean, coverage 70.6% -> 72%. Every fix has a test that
fails without it.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+26-1Lines changed: 26 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,39 @@ All notable changes to this Bosch Home Assistant custom component will be docume
4
4
5
5
## [Unreleased]
6
6
7
+
### Security
8
+
-**Diagnostics no longer leak the appliance serial.** POINTTAPI stores the
9
+
serial under `address`, `device_id`*and*`uuid` in the config entry, none of
10
+
which were redacted, and `/gateway/uuid`'s value passed through untouched
11
+
because the redactor matched a top-level `uuid`**key** that real
12
+
`{"id": ..., "value": ...}` responses never have. Four plaintext copies in a
13
+
file testers routinely paste into public issues.
7
14
### Added
8
15
-**Native-first Boost controls** — Redesigned POINTTAPI Boost controls with dedicated per-zone switches (`switch.*_boost`), serialized multi-zone activation via `asyncio.Lock` to prevent race conditions on rapid toggles, and integration into climate preset modes (`boost` / `none`) across all locales (#34).
9
16
-**Dedicated Heating Circuit (`hc1`) device partition** — Moved circuit-level heating settings away from individual room thermostat devices to a dedicated **Heating Installation** (`/heatingCircuits/hc1`) device to accurately reflect hardware topology.
10
17
-**Before:** Global circuit settings (e.g. supply limits, heating slope, boost duration/temperature) were incorrectly attached to the `zn1` room device (Zone 1 / Thermostat), duplicating or misattributing installation-wide properties.
11
18
-**After:** Supply limits (`supplyTemperatureLimitMax`, `supplyTemperatureLimitMin`), heating dynamics (`heatupCoolingSlope`, `buildingHeatup`), and global Boost settings (`boostTemperature`, `boostDuration`, `boostRemainingTime`) are properly assigned to the Heating Circuit (`/heatingCircuits/hc1`) device, ensuring clean device separation in Home Assistant (#34).
12
-
19
+
### Fixed
20
+
-**Local (XMPP/HTTP) entities are no longer all disabled on a fresh install.**
21
+
Every sensor, binary sensor, switch, select and number gated its
22
+
registry-enabled default on a per-entity opt-in list read from the config
23
+
entry — which nothing has ever written, in any released version. New local
24
+
installs showed a climate and water-heater entity and hid the rest. Existing
25
+
installs keep whatever they already have; only newly registered entities are
26
+
affected.
27
+
-**Solar devices survive a failed refresh.** A missing `/solarCircuits` key
28
+
removed the solar device *and every entity registry entry on it* — entity
29
+
ids, customisations and history association, irrecoverably. The coordinator
30
+
swallows per-path fetch failures, so one timeout during startup was enough.
31
+
Removal now requires a refresh that actually succeeded and returned data.
32
+
-**Turning a zone back on after Off no longer snaps back to Off.**`Off` is
33
+
written as manual mode at the minimum temperature; restoring the mode without
34
+
the setpoint left the zone at 5 °C, so the next poll re-detected `Off` and
35
+
reverted the card. The pre-`Off` setpoint is now restored with the mode.
13
36
### Changed
14
37
-**Read-only number paths** — Number entities for POINTTAPI resources that are read-only (`writeable: 0` or `False`) are now hidden/unavailable, ensuring number entities only represent interactive setpoints and controls (#34).
38
+
- The sensor platform is imported for real by the test harness instead of being
39
+
stubbed, so its setup path can be tested at all. Coverage 70.6% → 72%.
0 commit comments