MBMD: fix rs485 device models not recognized

This commit is contained in:
andig 2022-05-07 16:39:21 +02:00
parent 1ea8528dc3
commit f327b5bb35

View file

@ -244,7 +244,7 @@ func NewDevice(model string, subdevice int) (device meters.Device, err error) {
// IsRS485 determines if model is a known MBMD rs485 device model
func IsRS485(model string) bool {
for k := range rs485.Producers {
if strings.ToUpper(model) == k {
if strings.EqualFold(model, k) {
return true
}
}