Config UI: show static grid export limit on hems card (#32634)

This commit is contained in:
andig 2026-08-10 11:10:31 +02:00 • committed by GitHub
parent a237f698d0
commit 7b8e6e1f74
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 16 additions and 3 deletions

View file

@ -210,6 +210,7 @@ export default {
case "solarForecast":
case "dimLimit":
case "curtailLimit":
case "exportLimit":
return this.fmtW(value);
case "energy":
case "returnEnergy":

View file

@ -846,14 +846,18 @@ export default defineComponent({
return store.state?.hems;
},
hemsTags(): DeviceTags {
const result: DeviceTags = {};
const exportLimit = store.state?.gridExportLimit || 0;
if (exportLimit > 0) {
result["exportLimit"] = { value: exportLimit };
}
if (this.hemsDevices.length === 0 && !this.hems?.config?.configured) {
return { configured: { value: false } };
return exportLimit > 0 ? result : { configured: { value: false } };
}
const status = store.state?.hems?.status;
if (!status) {
return { configured: { value: true } };
return { ...result, configured: { value: true } };
}
const result: DeviceTags = {};
if (status.dimmed && status.maxConsumptionPower) {
result["dimLimit"] = {
value: status.maxConsumptionPower,