HEMS: make Dimmed/Curtailed tri-state (once more) (#30712)

This commit is contained in:
andig 2026-06-10 22:16:58 +02:00 • committed by GitHub
parent d859ae9c7c
commit 45cab34ce9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 32 additions and 31 deletions

View file

@ -42,8 +42,8 @@ export interface HemsConfig {
}
export interface HemsStatus {
dimmed: boolean;
curtailed: boolean;
dimmed?: boolean;
curtailed?: boolean;
maxConsumptionPower?: number;
maxProductionPower?: number;
}

View file

@ -805,7 +805,7 @@ export default defineComponent({
value: status.maxConsumptionPower,
warning: true,
};
} else {
} else if (status.dimmed !== undefined) {
result["dimmed"] = { value: status.dimmed };
}
if (status.curtailed && status.maxProductionPower !== undefined) {
@ -813,7 +813,7 @@ export default defineComponent({
value: status.maxProductionPower,
warning: true,
};
} else {
} else if (status.curtailed !== undefined) {
result["curtailed"] = { value: status.curtailed };
}