Vehicle status icons only when connected, tooltips, logs (#14795)

This commit is contained in:
Michael Geers 2024-07-09 20:42:14 +02:00 • committed by GitHub
parent 5e4ba36143
commit 082689fdc5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -270,7 +270,7 @@ export default {
},
vehicleLimitVisible() {
const limit = this.effectiveLimitSoc || 100;
return this.vehicleLimitSoc > 0 && this.vehicleLimitSoc < limit;
return this.connected && this.vehicleLimitSoc > 0 && this.vehicleLimitSoc < limit;
},
vehicleLimitTooltipContent() {
if (!this.vehicleLimitVisible) {
@ -285,7 +285,7 @@ export default {
return this.$t("main.vehicleStatus.vehicleLimit");
},
minSocVisible() {
return this.minSoc > 0 && this.vehicleSoc < this.minSoc;
return this.connected && this.minSoc > 0 && this.vehicleSoc < this.minSoc;
},
minSocTooltipContent() {
if (!this.minSocVisible) {
@ -539,8 +539,8 @@ export default {
}
},
smartCostClicked() {
this.smartCostTooltip?.hide();
this.openLoadpointSettings();
this.smartCostTooltip?.hide();
},
updatePvTooltip() {
this.pvTooltip = this.updateTooltip(

View file

@ -66,7 +66,7 @@ func (site *Site) plannerRates() (api.Rates, error) {
func (site *Site) plannerRate() (*api.Rate, error) {
rates, err := site.plannerRates()
if err != nil {
if rates == nil || err != nil {
return nil, err
}