Battery UI: drop orphan grid charge headline on fresh installs (#30530)

This commit is contained in:
Michael Geers 2026-06-05 11:06:30 +02:00 • committed by GitHub
parent 233cd72a95
commit 29e5599c99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -61,8 +61,11 @@ export default defineComponent({
devices.some(({ controllable }) => controllable) && this.state.smartCostAvailable
);
},
gridChargeLimit() {
return this.state.batteryGridChargeLimit ?? null;
},
gridChargeVisible() {
return this.gridChargePossible || this.state.batteryGridChargeLimit !== null;
return this.gridChargePossible || this.gridChargeLimit !== null;
},
gridChargeTariff() {
const { forecast, smartCostType } = this.state;
@ -70,7 +73,7 @@ export default defineComponent({
},
smartCostLimitProps() {
return {
currentLimit: this.state.batteryGridChargeLimit ?? null,
currentLimit: this.gridChargeLimit,
lastLimit: settings.lastBatterySmartCostLimit,
smartCostType: this.state.smartCostType,
currency: this.state.currency,