Skip to content

Add optional water statistics from the BLANCO Smart Home cloud - #23

Open
lackas wants to merge 3 commits into
Nailik:mainfrom
lackas:feature/cloud-statistics
Open

lackas wants to merge 3 commits into
Nailik:mainfrom
lackas:feature/cloud-statistics

Conversation

@lackas

@lackas lackas commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Bluetooth gives the current state but no consumption history. This adds an option, off by default, that reads lifetime totals and the error list from the BLANCO Smart Home API every 15 minutes and exposes them as sensors: water dispensed in total and per water type (device class water, so it works in the Energy dashboard), critical errors, warnings and the last error code. Tested on a CHOICE.All, the totals match the statistics in the UNIT app.

It uses blanco-smart-home-api-client from PyPI. The API runs on BLANCO's own backend, and the library comes from the author of home-assistant/core#168250, an open PR for a cloud-only BLANCO integration with two error sensors. The serial number and service code this integration already reads over BLE are enough to derive the cloud device id, so enabling the option only needs access granted once in the UNIT app.

How would you like to continue with this integration? With a cloud integration on its way into core, it could make sense to bring this one to core as well, as the local Bluetooth counterpart. Happy to help if you want to go that way.

Bluetooth only exposes the current state, not consumption history. If
enabled in the options flow, a second coordinator reads lifetime totals
and the error list from the BLANCO Smart Home API every 15 minutes via
blanco-smart-home-api-client, and adds sensors for water dispensed (in
total and per water type), error counts and the last error.

The cloud dev_id is derived from serial number and service code, which
the BLE coordinator already reads, so enabling needs no input. One app
id is registered and kept in the options. The token is only held in
memory, because writing it to the entry would reload the entry through
its update listener.

Three config entry mocks in test_init gain options = {}.
@Nailik

Nailik commented Oct 16, 2026

Copy link
Copy Markdown
Owner

I already thought about bringing this into core but it will probably cose some time cleaning up the code to home assistant standards.
But the main thing why i didn't try it yet was the remaining issue with the Blanco Choice All.

I think i wouldn't include cloud for now when there is a separate integration that handles all the cloud part.

@lackas

lackas commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

@Nailik coming back to your point about a separate integration for the cloud part: core#168250 has been stuck in review since April. Changes are still requested, and the reviewer had to ask several times to stop replying with LLM output (home-assistant/core#168250 (review)). It is now cut down to two error count sensors, the water statistics are deferred to later PRs. So that data won't reach Home Assistant through it soon. Would you take the cloud part here as an opt-in after all, or should I move it into its own integration?

@Nailik

Nailik commented Nov 2, 2026

Copy link
Copy Markdown
Owner

I'll have a look at it and test how it feels in the integration.

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.

2 participants