Remove battery/pv configured properties (#12498)
This commit is contained in:
parent
304a74bca7
commit
fc67fdfd8c
5 changed files with 18 additions and 13 deletions
|
|
@ -63,10 +63,8 @@ export default {
|
|||
gridConfigured: Boolean,
|
||||
gridPower: Number,
|
||||
homePower: Number,
|
||||
pvConfigured: Boolean,
|
||||
pvPower: Number,
|
||||
pv: Array,
|
||||
batteryConfigured: Boolean,
|
||||
batteryPower: Number,
|
||||
batterySoc: Number,
|
||||
batteryDischargeControl: Boolean,
|
||||
|
|
@ -104,6 +102,12 @@ export default {
|
|||
smartCostActive: Boolean,
|
||||
},
|
||||
computed: {
|
||||
batteryConfigured: function () {
|
||||
return this.battery?.length;
|
||||
},
|
||||
pvConfigured: function () {
|
||||
return this.pv?.length;
|
||||
},
|
||||
energyflow: function () {
|
||||
return this.collectProps(Energyflow);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ export default {
|
|||
},
|
||||
sponsor: String,
|
||||
sponsorTokenExpires: Number,
|
||||
batteryConfigured: Boolean,
|
||||
battery: Array,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -132,6 +132,9 @@ export default {
|
|||
};
|
||||
},
|
||||
computed: {
|
||||
batteryConfigured: function () {
|
||||
return this.battery?.length;
|
||||
},
|
||||
logoutCount() {
|
||||
return this.providerLogins.filter((login) => !login.loggedIn).length;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
batteryModalAvailabe: function () {
|
||||
return store.state.batteryConfigured;
|
||||
return store.state.battery?.length;
|
||||
},
|
||||
globalSettingsProps: function () {
|
||||
return this.collectProps(GlobalSettingsModal, store.state);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ const (
|
|||
HomePower = "homePower"
|
||||
PrioritySoc = "prioritySoc"
|
||||
Pv = "pv"
|
||||
PvConfigured = "pvConfigured"
|
||||
PvEnergy = "pvEnergy"
|
||||
PvPower = "pvPower"
|
||||
ResidualPower = "residualPower"
|
||||
|
|
@ -43,10 +42,9 @@ const (
|
|||
BufferStartSoc = "bufferStartSoc"
|
||||
|
||||
// battery status
|
||||
Battery = "battery"
|
||||
BatteryConfigured = "batteryConfigured"
|
||||
BatteryEnergy = "batteryEnergy"
|
||||
BatteryMode = "batteryMode"
|
||||
BatteryPower = "batteryPower"
|
||||
BatterySoc = "batterySoc"
|
||||
Battery = "battery"
|
||||
BatteryEnergy = "batteryEnergy"
|
||||
BatteryMode = "batteryMode"
|
||||
BatteryPower = "batteryPower"
|
||||
BatterySoc = "batterySoc"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -814,8 +814,8 @@ func (site *Site) prepare() {
|
|||
site.publish(keys.SiteTitle, site.Title)
|
||||
|
||||
site.publish(keys.GridConfigured, site.gridMeter != nil)
|
||||
site.publish(keys.PvConfigured, len(site.pvMeters) > 0)
|
||||
site.publish(keys.BatteryConfigured, len(site.batteryMeters) > 0)
|
||||
site.publish(keys.Pv, make([]api.Meter, len(site.pvMeters)))
|
||||
site.publish(keys.Battery, make([]api.Meter, len(site.batteryMeters)))
|
||||
site.publish(keys.BufferSoc, site.bufferSoc)
|
||||
site.publish(keys.BufferStartSoc, site.bufferStartSoc)
|
||||
site.publish(keys.PrioritySoc, site.prioritySoc)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue