Fix reading name in error message
This commit is contained in:
parent
c98529aea9
commit
d07695a812
1 changed files with 1 additions and 1 deletions
|
|
@ -91,7 +91,7 @@ func NewModbusFromConfig(other map[string]interface{}) (api.Meter, error) {
|
|||
if cc.Energy != "" {
|
||||
cc.Energy = modbus.ReadingName(cc.Energy)
|
||||
if err := modbus.ParseOperation(device, cc.Energy, &m.opEnergy); err != nil {
|
||||
return nil, fmt.Errorf("invalid measurement for energy: %s", cc.Power)
|
||||
return nil, fmt.Errorf("invalid measurement for energy: %s", cc.Energy)
|
||||
}
|
||||
|
||||
totalEnergy = m.totalEnergy
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue