Config UI: solar tariff configured (#20079)

This commit is contained in:
Michael Geers 2025-03-24 20:54:13 +01:00 • committed by GitHub
parent df9661c2ab
commit 836e41c442
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 14 additions and 2 deletions

View file

@ -52,6 +52,7 @@ export default {
}
switch (name) {
case "power":
case "solarForecast":
return this.fmtW(value);
case "energy":
case "capacity":

View file

@ -510,8 +510,13 @@ export default {
return this.getChargerById(this.selectedChargerId)?.name;
},
tariffTags() {
const { currency, tariffGrid, tariffFeedIn, tariffCo2 } = store.state;
if (tariffGrid === undefined && tariffFeedIn === undefined && tariffCo2 === undefined) {
const { currency, tariffGrid, tariffFeedIn, tariffCo2, tariffSolar } = store.state;
if (
tariffGrid === undefined &&
tariffFeedIn === undefined &&
tariffCo2 === undefined &&
tariffSolar === undefined
) {
return null;
}
const tags = {};
@ -527,6 +532,9 @@ export default {
if (tariffCo2) {
tags.co2 = { value: tariffCo2 };
}
if (tariffSolar) {
tags.solarForecast = { value: tariffSolar };
}
return tags;
},
mqttTags() {

View file

@ -969,6 +969,7 @@ func (site *Site) prepare() {
}
site.publishVehicles()
site.publishTariffs(0, 0)
vehicle.Publish = site.publishVehicles
}

View file

@ -95,6 +95,7 @@ powerRange = "Leistung"
range = "Reichweite"
singlePhase = "Einphasig"
soc = "Ladestand"
solarForecast = "PV-Vorhersage"
temp = "Temperatur"
topic = "Thema"
url = "URL"

View file

@ -95,6 +95,7 @@ powerRange = "Power"
range = "Range"
singlePhase = "Single phase"
soc = "Charge"
solarForecast = "Solar forecast"
temp = "Temperature"
topic = "Topic"
url = "URL"