-
Notifications
You must be signed in to change notification settings - Fork 0
Sensor availability
Brunata sensors stay available for as long as they have received at least one valid reading. They do not go unavailable when a poll fails.
This is deliberate, and it has a visible consequence: a sensor can sit on the same value for hours or days without anything being broken. This page explains when that is normal, and how to tell the difference.
Every Brunata sensor uses state_class: total_increasing, which feeds Home
Assistant's Long Term Statistics — the data behind the Energy dashboard and
long-range history.
Long Term Statistics are written as the state changes. If a sensor goes
unavailable, no statistics are recorded for that period, and the gap cannot
be filled in afterwards. Restoring it would mean re-inserting historical
statistics by hand, which Home Assistant deliberately makes difficult.
A Brunata outage of a few hours would therefore leave a permanent hole in a dataset that is meant to span years. Holding the last known value costs nothing by comparison: meters report infrequently anyway, so a held value is usually still the correct one.
Every sensor carries a reading_date attribute holding the date of the last
reading Brunata's API returned.
Fresh: reading_date advances as new readings arrive.
Stale: the sensor value looks normal, but reading_date has stopped moving
while the state itself hasn't changed either.
To see it, open the sensor in Developer Tools → States, or add it to a card:
type: entities
entities:
- entity: sensor.brunata_water_12345_consumption
secondary_info: last-changed
type: attribute
attribute: reading_date
name: Last readingIf you want to be told when readings stop arriving, use a template sensor on
reading_date rather than on availability:
template:
- binary_sensor:
- name: "Brunata readings stale"
state: >
{{ (now().date() -
(state_attr('sensor.brunata_water_12345_consumption',
'reading_date') | as_datetime).date()).days > 7 }}Adjust the threshold to your meter. Heat cost allocators and water meters often report only every few days, so a short threshold will produce false alarms.
A failed poll is logged, not surfaced as unavailability. To see what the integration is doing:
- Settings → Devices & Services → Brunata
- Three-dot menu → Enable debug logging
- Reproduce, then disable it again — Home Assistant offers the log for download
Two failure modes are handled differently:
| Situation | Behaviour |
|---|---|
| Cannot reach Brunata | Last known values are kept, sensors stay available |
| Brunata returns an error | The update is marked failed; values are still held |
| Credentials no longer accepted | Home Assistant prompts you to re-authenticate |
Only the last one requires action from you.