mypyllant-component
mypyllant-component copied to clipboard
Plugin misuses recorder state_attributes table
Before submitting a new issue
- [X] I redownloaded the latest release and restarted Home Assistant
- [X] I've checked known issues
- [ ] I've enabled debug logs and attached the relevant logs to this ticket
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 is this still a problem?
yes, if this issue is to be resolved, it requires code adjustments but there hasn't been a release since I opened the issue
@signalkraft poke