Skip to content

Commit

Permalink
Minor demo cmds fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DerAndereAndi committed Oct 10, 2024
1 parent e72a7ae commit 94653eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/evse/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (h *evse) OnLPCEvent(ski string, device spineapi.DeviceRemoteInterface, ent
h.uclpc.ApproveOrDenyConsumptionLimit(msgCounter, true, "")
}
case lpc.DataUpdateLimit:
if currentLimit, err := h.uclpc.ConsumptionLimit(); err != nil {
if currentLimit, err := h.uclpc.ConsumptionLimit(); err == nil {
fmt.Println("New Limit set to", currentLimit.Value, "W")
}
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/hems/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func (h *hems) OnLPCEvent(ski string, device spineapi.DeviceRemoteInterface, ent
h.uccslpc.ApproveOrDenyConsumptionLimit(msgCounter, true, "")
}
case cslpc.DataUpdateLimit:
if currentLimit, err := h.uccslpc.ConsumptionLimit(); err != nil {
if currentLimit, err := h.uccslpc.ConsumptionLimit(); err == nil {
fmt.Println("New LPC Limit set to", currentLimit.Value, "W")
}
}
Expand Down

0 comments on commit 94653eb

Please sign in to comment.