HEMS: add custom implementation (#32187)

This commit is contained in:
andig 2026-07-29 14:41:12 +02:00 • committed by GitHub
parent ce75e49192
commit 4c26af7f5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 436 additions and 38 deletions

View file

@ -448,6 +448,19 @@ func testInstance(ctx context.Context, instance any) map[string]testResult {
}
})
wg.Go(func() {
if dev, ok := api.Cap[api.HEMS](instance); ok {
if power := dev.MaxConsumptionPower(); power != nil && *power > 0 {
makeResult("dimLimit", *power, nil)
}
if percent := dev.CurtailedPercent(); percent != nil && *percent < 100 {
if limit := dev.MaxProductionPower(); limit != nil {
makeResult("curtailLimit", *limit, nil)
}
}
}
})
wg.Go(func() {
if dev, ok := api.Cap[api.Identifier](instance); ok {
val, err := dev.Identify()