diff --git a/charger/ocpp.go b/charger/ocpp.go index 76d7109d2..0f546b7dc 100644 --- a/charger/ocpp.go +++ b/charger/ocpp.go @@ -333,7 +333,7 @@ func (c *OCPP) hasMeasurement(val types.Measurand) bool { // hasProperty checks if comma-separated string contains given string ignoring whitespaces func (c *OCPP) hasProperty(props string, prop string) bool { return slices.ContainsFunc(strings.Split(props, ","), func(s string) bool { - return prop == strings.TrimSpace(s) + return strings.HasPrefix(strings.ReplaceAll(s, " ", ""), prop) }) }