HEMS: add custom implementation (#32187)
This commit is contained in:
parent
ce75e49192
commit
4c26af7f5c
10 changed files with 436 additions and 38 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue