@lmilcent I just looked at the database you sent me, and Iâm very surprised by its content ![]()
You have device_feature_state values that are « NaN » (Not a Number). Itâs very strange that this was inserted, given that the field is a « double precision », and « NaN » is not a double precisionâŠ
Of course, this crashes the aggregation that expects numerical values, not a string.
After investigation, these values come from the Zigbee2mqtt integration.
I created a GitHub issue to fix the problem:
- Add a DB migration to clean up these lines that shouldnât be there
- See why the validation and the DB accepted these values that are not Numbers.
In the meantime, @lmilcent and @Albenss, the SQL query to fix your DBs is:
DELETE FROM t_device_feature_state WHERE value = 'NaN';
@lmilcent More generally, I donât know if you keep all your historical sensor data (you keep them all), but I would advise you to clean up some very verbose deviceFeatures, because currently to perform the aggregation on my Mac, some sensors contained so many values that it took more than 1.5 Gb of RAM to perform the total aggregation (since itâs a first aggregation, it starts from the beginning. This will not be the case later)
Otherwise, by removing the NaN, it works very well for me on your DB:

