Config UI: show static grid export limit on hems card (#32634)
This commit is contained in:
parent
a237f698d0
commit
7b8e6e1f74
5 changed files with 16 additions and 3 deletions
|
|
@ -210,6 +210,7 @@ export default {
|
|||
case "solarForecast":
|
||||
case "dimLimit":
|
||||
case "curtailLimit":
|
||||
case "exportLimit":
|
||||
return this.fmtW(value);
|
||||
case "energy":
|
||||
case "returnEnergy":
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue