Lay Groundwork for Reference-Driven Device and Program Data Fetch - #17
Conversation
Use live solar resource availability instead of root references when deciding whether to create POINTTAPI solar entities. Add regression coverage for unavailable resources and valid zero values.
…bility Fix conditional Solar entity creation
Localize POINTTAPI entity names and state values across all supported languages, including comfort controls, diagnostics, firmware status, switches, and PIR sensitivity while preserving API values.
Use schema-valid normalized select state keys and map them back to Bosch values for writes. Remove invalid free-form no-update state translations and update regression coverage.
Remove stale Solar entities and the Solar device from the Home Assistant registries when POINTTAPI returns no usable solar resources. Also use the same availability check when creating Solar entities.
…to feature/french-translations # Conflicts: # custom_components/bosch/sensor/__init__.py
# Conflicts: # custom_components/bosch/sensor/__init__.py
…ture/french-translations # Conflicts: # custom_components/bosch/pointtapi_entities.py # custom_components/bosch/strings.json # custom_components/bosch/translations/de.json # custom_components/bosch/translations/en.json # custom_components/bosch/translations/fr.json # custom_components/bosch/translations/it.json # custom_components/bosch/translations/nl.json # custom_components/bosch/translations/pl.json # custom_components/bosch/translations/sk.json # unittests/test_pointtapi_new_entities.py
…to feature/french-translations
…ture/french-translations # Conflicts: # custom_components/bosch/pointtapi_entities.py # unittests/test_pointtapi_multizone.py
…ture/french-translations # Conflicts: # custom_components/bosch/pointtapi_entities.py
Add /programs and /devices to POINTTAPI_COORDINATOR_ROOTS so these resources are fetched at top-level during coordinator refresh. This keeps required metadata available for entity behavior that depends on those endpoints and avoids missing data when they are not reachable through reference traversal alone.
|
@CaseyRo : I need to one to continue the work on devices and programs, what I added yesterday in the coordinator was not enough. This morning, while testing latest beta, I couldn't find the extracted data in the diag dump. |
|
@jfhautenauven mystery solved — beta.6 was tagged before #15 merged, so the v1.2.0-beta.7 is out now with #15 aboard: https://github.com/CaseyRo/ha_bosch/releases/tag/v1.2.0-beta.7 — update, reload the integration once, and your next diag dump should have the extracted data for the telemetry work. And thanks for the stable 👍 on #11 — I'll hold 1.2.0 until you've confirmed the |
|
@CaseyRo : this should be enough work done for the moment. I'm stopping with new functionalities. I let you review the code. I'm updating the description of the PR, and I'll call it a day codewise. Of course, eager to test as soon as you validate and release a beta :D |
|
@CaseyRo : I propose beta 8 is the last beta for 1.2.0. For new features / changes, that will be on 1.3.0 Given the fact I'm soon to go on holydays, I'd resume, speaking for myself, around end of August :) |
…us, missing diacritics Review fixes on top of #17: - valve signal sensor dropped SensorDeviceClass.SIGNAL_STRENGTH; HA only accepts dB/dBm for it, and /devices/list reports link quality as a percentage - unknown zone /status no longer maps to HVACAction.COOLING on a heating-only appliance; unrecognised values are reported as unknown - restored diacritics in the localized device-name table (fr/pl/sk) and in the two new Polish electricity strings - dropped the now-empty _BOILER_KINDS set and its dead branch - new guard test asserts every POINTTAPI sensor unit is valid for its device class
…gned program, schedule/manual climate
|
Merged, and v1.2.0-beta.8 is out with it: https://github.com/CaseyRo/ha_bosch/releases/tag/v1.2.0-beta.8 🚀 Deal on your plan: beta.8 is the last beta for 1.2.0, everything new goes to 1.3.0. Update + reload once, and if it looks right to you before you leave, stable ships and #5, #10, #11 and #16 close with it. If you don't get to it, I'll ship on @janfuu-cpu's confirmation — he gave the 👍 on beta.7 tonight — and your 1.3.0 items wait for you at the end of August. Reference-driven expansion for I fixed four things on top of the merge (7c8a6ea) — all mine to catch in review, none of them worth another round-trip while you're packing: 1. Valve signal strength would have errored on every valve. 2. This one needs you: your test used 3. Missing accents. 4. Dead code. Two of your tests asserted the old behavior on 1 and 2, so I updated them rather than deleting them. 327 pass, lint clean. Four things I deliberately left alone for 1.3.0, so they're waiting for you rather than decided without you:
Enjoy the holiday — genuinely, thank you for the pace this week. Nothing here is waiting on you until you're back. 🏖️ |
1.2.0 stable ships the beta.7 content confirmed by both multi-zone testers. PR #17 (per-valve telemetry, assigned program, schedule/manual climate) moves to the 1.3.0 line so it can be confirmed on real hardware first.
|
Correction to what I wrote an hour ago, before you read it and act on it: #17 is not in stable 1.2.0. It went out as v1.3.0-beta.1 — same code, its own release line. Stable v1.2.0 shipped the beta.7 content instead — the multi-zone work you and @janfuu-cpu both confirmed on real hardware. Why the change: I agreed to your beta.8 plan too quickly. 1.2.0 had two testers with 17 ETRVs between them signing off; #17 has nobody yet, and I have a single-zone CT200 that can't exercise a single line of it. Stacking unverified work onto verified work right before you disappear for two weeks meant the first real report would land with nobody around to act on it. Your own boundary was the right one — I just drew it one PR earlier. Nothing is lost: your work is released, installable, and testers can opt into it. It simply carries a version number that says "not proven yet", which is honest. The Enjoy the holiday. 🏖️ |
🚀 Improve POINTTAPI Discovery, Climate Behavior & Entity Modeling
📋 Summary
This PR significantly improves the POINTTAPI integration by making data discovery more reference-driven, improving climate behavior, adding missing high-value entities, and refining device grouping and localization for a better Home Assistant UX.
The discovery strategy for Zones, Programs, and Devices is now more consistent and adaptable to different POINTTAPI implementations, while preserving safe fallback behavior for existing installations.
✨ What changed
Programs and Devices now follow the same reference-driven discovery model already used for Zones.
📅 Dynamic Program discovery
Uses /programs references to dynamically discover the appropriate resources.
Added dynamic expansion of Program resources instead of relying exclusively on static paths.
📱 Dynamic Device discovery
Uses /devices references to dynamically discover available Device resources.
Added dynamic expansion of Device resources instead of relying exclusively on static paths.
🛡️ Safe fallback behavior
Discovery remains resilient when reference-based discovery is unavailable:
Programs discovery unavailable → falls back to fetching /programs
Devices discovery unavailable → falls back to fetching /devices
This makes entity creation more robust across installations with different gateway capabilities.
Improved the handling of zone operating modes and climate state:
Implemented explicit program/manual semantics for zone operation.
Improved HVAC mode handling and write behavior for user mode updates.
Added more accurate hvac_action mapping, including:
idle
heat
heat-request states
These changes make the exposed Home Assistant climate behavior better match the expected POINTTAPI semantics.
Added dynamic per-thermostat-valve entities based on /devices/list.
Each valve now exposes dedicated diagnostics:
📶 Signal strength
🔋 Battery
🏠 Assigned zone
📡 Protocol
Added proper warning handling through a dedicated binary problem sensor:
0 → ✅ No warning⚠️ Attention required
Non-zero →
Each valve also receives its own device mapping, with valve names properly decoded from the gateway data.
Added a dedicated per-zone sensor displaying the currently assigned program name.
The mapping is resolved dynamically:
zone clockProgram → program ID → /programs/pgN/name
Program names are automatically Base64-decoded.
The implementation is resilient to incomplete data:
Missing program mapping → returns None
Missing program name → falls back to the program ID
Helpful attributes are exposed, including:
Program ID
Program path
5. ⚡ Energy Device & Electricity Averages
Energy-related entities have been moved out of the Boiler device into a dedicated device:
Performance energetique
Added conditional electricity sensors under the energy area:
📊 dayAverage
📊 monthAverage
These sensors are created only when the corresponding data is available.
This provides a clearer separation between boiler-related entities and overall energy/performance data.
Replaced hardcoded labels for newly introduced dynamic entities with proper translation keys.
Translation entries have been added across all supported locales for:
🔧 Thermostat valve diagnostics
⚠️ Thermostat valve warning
📅 Assigned program
⚡ Electricity day/month averages
Device names are now localized at creation time using the active Home Assistant language.
🎯 Why?
This change provides several improvements to the integration:
🧩 More flexible discovery
Prepares the integration for appliances exposing variable Program and Device sub-resources.
🚫 Fewer assumptions
Reduces reliance on static API paths and hardcoded resource structures.
🔄 Better adaptability
Allows the integration to adapt to different POINTTAPI implementations and gateway capabilities.
🏗️ Consistent discovery strategy
Aligns discovery behavior across:
Zones → Programs → Devices
🧭 Better Home Assistant UX
Provides clearer device grouping, more meaningful entities, and better diagnostics.
✅ Better correctness
Climate state handling, warning semantics, and resource mapping now more closely match the expected POINTTAPI behavior.
🌍 Better localization
New entities and dynamically created devices are consistently translatable across supported locales.
🧹 Better maintainability
A more consistent discovery architecture provides a cleaner foundation for supporting additional POINTTAPI resources in the future.
🧪 Validation
Added and updated targeted unit tests covering:
🔎 Reference-driven Programs discovery
⚠️ Valve warning mapping
📱 Reference-driven Devices discovery
🛡️ Programs/Devices fallback behavior
🔧 Dynamic thermostat valve entities
📅 Assigned program mapping
📭 Empty/incomplete program data handling
⚡ Energy routing to the dedicated device
📊 Conditional electricity average sensor creation
🌍 Localized device naming behavior
Targeted test suites pass locally after these changes. ✅
📦 Impact
✅ No breaking changes expected
🔙 Backward-compatible behavior preserved through the existing fallback paths
🚀 More flexible foundation for supporting new Program and Device resources
🧩 Better compatibility with installations exposing different POINTTAPI capabilities
🧹 Improved overall consistency and maintainability
📝 Notes
Some device names are now language-aware at creation time.
If the Home Assistant language is changed later, the integration may need to be reloaded to refresh existing device registry labels.