Skip to content

Commit

Permalink
add timezone offset for pacificpower
Browse files Browse the repository at this point in the history
  • Loading branch information
solderq35 committed Feb 21, 2024
1 parent 16d785c commit d05b383
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/store/block.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,11 @@ const actions = {
let moduleSpace = store.getters.path + '/' + chartSpace
this.registerModule(moduleSpace.split('/'), Chart)
let utilityType = ''
let blockClassInt = ''
if (this.getters[payload.group.path + '/meters'].length > 0) {
await this.getters[payload.group.path + '/meters'][0].promise
utilityType = this.getters[this.getters[payload.group.path + '/meters'][0].path + '/type']
blockClassInt = this.getters[this.getters[payload.group.path + '/meters'][0].path + '/classInt']
}
// this defines the "default chart", "Total Electricity"
store.commit(chartSpace + '/name', 'Total ' + utilityType)
Expand Down Expand Up @@ -257,7 +259,7 @@ const actions = {
// change default interval for solar panels
// Note: this parameter is often modified elsewhere in the dashboard
// E.g. Building list component changes it via a Vue router parameter
if (utilityType === 'Solar Panel') {
if (utilityType === 'Solar Panel' || blockClassInt === 9990002) {
// Solar panel webscraper uploads time_seconds in UTC
// so we're gonna need to add the offset for the correct time
// in pacific standard time.
Expand Down

0 comments on commit d05b383

Please sign in to comment.