Energy Dashboard SQL problem after 2021.10 upgrade

According to the release notes, the row_number issue is supposed to be fixed in 2021.10.4

Tried it again yesterday, but still the same issue

Assuming you have the same error, the OVER clause is also someting new in mysql 8.0.

2021.10.4 restored long term stats for me on MySQL5.7

Also for me. Thank you

Yes, I can confirm too… The latest update fixed it for me too. Thanks to all the guys working on this!!

It seems like there’s an issue with the SQL syntax in your query, specifically related to the row_number() function and the OVER (PARTITION BY ... ORDER BY ...) clause. This error likely emerged due to changes in MySQL server version compatibility after your upgrade to 2021.10. To resolve this, you may need to adjust the syntax of your SQL query to be compatible with your current MySQL server version.

Check the MySQL documentation corresponding to your server version to ensure proper syntax usage for functions like row_number() and window functions. Additionally, consider consulting the release notes of your Home Assistant version to see if there are any specific instructions or compatibility issues mentioned regarding MySQL versions.

1 Like