sensor labels

This commit is contained in:
2024-07-31 16:26:51 +02:00
parent d6e7fa3949
commit 1d1942a4d3

View File

@ -34,7 +34,7 @@ func Parse(fPort int, _ []byte, frmPayload string, variables *map[string]databas
sensorsMap := make(map[string]string)
sensorsJSON, ok := (*device).Attributes["Sensors"].(string)
if !ok {
return fmt.Errorf("Unable to load sensor map from attributes")
return fmt.Errorf("Unable to load sensor map from attributes: %s", (*device).Attributes)
}
errJ := json.Unmarshal([]byte(sensorsJSON), &sensorsMap)
if errJ != nil {