OSU-Sustainability-Office / energy-dashboard

Oregon State University's energy dashboard.
https://dashboard.sustainability.oregonstate.edu
GNU General Public License v3.0
11 stars 0 forks source link

[Pacific Power] FindClosest Function Bug with Frontend Graph Logic #304

Closed solderq35 closed 4 months ago

solderq35 commented 5 months ago

Reference from last year

https://github.com/OSU-Sustainability-Office/energy-dashboard/issues/191 https://github.com/OSU-Sustainability-Office/energy-dashboard/pull/216

https://github.com/OSU-Sustainability-Office/energy-dashboard/pull/220

resultDataObject is an array of objects, e.g.

[
{
  value: <measurement, e.g. kwh>
  time_seconds: <unix>
},
{...}
]

There is a getter function in accumulated_real, energy_change, etc. that expects the elements in the array of objects to be at regular intervals. findCloset rounds the indices to nearest valid, e.g. 7 PM original query rounds to 11:59 PM if that's only valid option.

Other Tips

Current related PacificPower Issues: