mypyllant-component icon indicating copy to clipboard operation
mypyllant-component copied to clipboard

Plugin misuses recorder state_attributes table

Open theodiefenthal opened this issue 7 months ago • 3 comments
trafficstars

Before submitting a new issue

Problem description

I just came across the plugin and checked out some internals like the REST API calls and the database entries as I have never used Home Assistant before and find this a great place to check out how home assistant works.

I setup my Home Assistant to have a TimeScaleDB (postgres) reporter.

When I checkout the table state_attributes, I find that it has a column "shared_attrs". The plugin here reports many values not reported as sensors in an attribute. For instance, my firmware_version contains shared attributes like "outdoor_temperature", "outdoor_temperature_average24h", "system_water_pressure", "system_flow_temperature" and so on. All these examples are floating point numbers and they can take arbitrary values that change often.

These shared attributes are hence in practice not shared at all: On every update, it is very likely that at least one floating point number changed and the combination from all different values is different to all before, hence creating a new row in the state_attributes table with a new shared_state, which I think is off design.

I think, the the state_attributes table should contain only attributes that have a decent set of possible values (Enums, or values like bivalance_point that is likely to change very rarely and can only be set to a small amount of values in the heater setup). The floating point numbers should better be removed and be reported as sensors which would also make them easier to visualize.

theodiefenthal avatar Mar 29 '25 08:03 theodiefenthal

@theodiefenthal is this still a problem?

boelle avatar May 13 '25 07:05 boelle

yes, if this issue is to be resolved, it requires code adjustments but there hasn't been a release since I opened the issue

theodiefenthal avatar May 13 '25 22:05 theodiefenthal

@signalkraft poke

boelle avatar Oct 26 '25 09:10 boelle