Skip to content

Commit

Permalink
Fix LPP typo for hems demo cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
DerAndereAndi committed Sep 11, 2024
1 parent 9cc1fcf commit e7bda97
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions cmd/hems/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"github.com/enbility/eebus-go/api"
"github.com/enbility/eebus-go/service"
ucapi "github.com/enbility/eebus-go/usecases/api"
"github.com/enbility/eebus-go/usecases/cs/lpc"
cslpc "github.com/enbility/eebus-go/usecases/cs/lpc"
cslpp "github.com/enbility/eebus-go/usecases/cs/lpp"
eglpc "github.com/enbility/eebus-go/usecases/eg/lpc"
Expand Down Expand Up @@ -122,7 +121,7 @@ func (h *hems) OnLPCEvent(ski string, device spineapi.DeviceRemoteInterface, ent
}

switch event {
case lpc.WriteApprovalRequired:
case cslpc.WriteApprovalRequired:
// get pending writes
pendingWrites := h.uccslpc.PendingConsumptionLimits()

Expand All @@ -131,7 +130,7 @@ func (h *hems) OnLPCEvent(ski string, device spineapi.DeviceRemoteInterface, ent
fmt.Println("Approving LPC write with msgCounter", msgCounter, "and limit", write.Value, "W")
h.uccslpc.ApproveOrDenyConsumptionLimit(msgCounter, true, "")
}
case lpc.DataUpdateLimit:
case cslpc.DataUpdateLimit:
if currentLimit, err := h.uccslpc.ConsumptionLimit(); err != nil {
fmt.Println("New LPC Limit set to", currentLimit.Value, "W")
}
Expand All @@ -146,7 +145,7 @@ func (h *hems) OnLPPEvent(ski string, device spineapi.DeviceRemoteInterface, ent
}

switch event {
case lpc.WriteApprovalRequired:
case cslpp.WriteApprovalRequired:
// get pending writes
pendingWrites := h.uccslpp.PendingProductionLimits()

Expand All @@ -155,7 +154,7 @@ func (h *hems) OnLPPEvent(ski string, device spineapi.DeviceRemoteInterface, ent
fmt.Println("Approving LPP write with msgCounter", msgCounter, "and limit", write.Value, "W")
h.uccslpp.ApproveOrDenyProductionLimit(msgCounter, true, "")
}
case lpc.DataUpdateLimit:
case cslpp.DataUpdateLimit:
if currentLimit, err := h.uccslpp.ProductionLimit(); err != nil {
fmt.Println("New LPP Limit set to", currentLimit.Value, "W")
}
Expand Down

0 comments on commit e7bda97

Please sign in to comment.