OpenEnergyDashboard / OED

Open Energy Dashboard (OED)
Mozilla Public License 2.0
83 stars 316 forks source link

fix compare sql & migrations #1362

Closed huss closed 4 weeks ago

huss commented 1 month ago

Description

Compare readings had a bug with flow units where it was summing rather than averaging. Fixed by using hourly table that is a rate for all units. This is also more efficient than looking at meter readings but does limit to full hour data that was current usage anyway.

The users migrations were in the previously planned 1.0.0-1.1.1 and was moved to current 1.0.0-2.0.0. The index already listed it there.

Type of change

Checklist

Limitations

None known. Note that current databases should update when run for the compare changes.

huss commented 4 weeks ago

This PR is needed for some tests to pass in current PRs. To move forward, I am merging this on my own. I hope someone else will double check this in the future. Note if the new tests fail then that is an indication the fix needs changes.