You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although having configured multiple UPS's in NUT, in MQTT I found unique values for all those UPS's. For my purpose I fixed it in pkg/nut_client/nut_client.go this way:
for num := range upsList { - upsVariables, err := upsList[0].GetVariables() + upsVariables, err := upsList[num].GetVariables() if err != nil {
But as I'm not a Go developer I cannot tell whether this has negative impact to the error handling of this block. There might be a reason for using upsList[0] instead of upsList[num]
The text was updated successfully, but these errors were encountered:
Although having configured multiple UPS's in NUT, in MQTT I found unique values for all those UPS's. For my purpose I fixed it in pkg/nut_client/nut_client.go this way:
for num := range upsList {
- upsVariables, err := upsList[0].GetVariables()
+ upsVariables, err := upsList[num].GetVariables()
if err != nil {
But as I'm not a Go developer I cannot tell whether this has negative impact to the error handling of this block. There might be a reason for using upsList[0] instead of upsList[num]
The text was updated successfully, but these errors were encountered: