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

update solar label prelim work #308

Closed solderq35 closed 7 months ago

solderq35 commented 8 months ago

image

TODO

s-egge commented 8 months ago

Making a new class with only energy_change didn't work, I believe due to meters not being classified as a Solar Panel unless they had a total_energy type: https://github.com/OSU-Sustainability-Office/energy-dashboard/blob/86c7cac1bf2896cc7314e6cf55505e27d9525204/backend/dependencies/nodejs/models/meter.js#L118 Removing the excess meters and changing the code to check for energy_change for Solar instead seems to have fixed it. I tested the Tesla solar buildings as well and they don't seem negatively affected. This has removed the extra, non-working measurements from the edit card.

solderq35 commented 7 months ago

I removed a few more references to the removed measurement types:

      total_energy: 'kWh',
      voltage: 'V',
      current: 'A'

And updated comment in the meter_classes file to reflect the current solar meters.

NOTE

I didn't remove the above measurement variables from the backend tests (backend\tests\data_layer.spec.js and backend\tests\assertedData\mock_solar_data.json, but the tests should be turned off at the moment for solar data anyways, and the solar backend testing needs a revamp (e.g. don't test with 15 minute intervals).

Low priority, push to future PR I think

Relevant issue: https://github.com/OSU-Sustainability-Office/energy-dashboard/issues/248