From d6e7fa39495ac9639408ad9857f97e46410af492 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Wed, 31 Jul 2024 16:22:39 +0200 Subject: [PATCH] sensor labels --- .../hottisThreeWayThermometer/hottisThreeWayThermometer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/udi/handlers/ttn/models/hottisThreeWayThermometer/hottisThreeWayThermometer.go b/src/udi/handlers/ttn/models/hottisThreeWayThermometer/hottisThreeWayThermometer.go index 1c75f03..602c1c3 100644 --- a/src/udi/handlers/ttn/models/hottisThreeWayThermometer/hottisThreeWayThermometer.go +++ b/src/udi/handlers/ttn/models/hottisThreeWayThermometer/hottisThreeWayThermometer.go @@ -30,9 +30,9 @@ func getSensorName(sensorsMap *map[string]string, sensorAddress uint64) string { return "Sensor" + key } -func Parse(fPort int, _ []byte, frmPayload string, variables *map[string]database.VariableType, attributes *map[string]interface{}, _ *database.Device) error { +func Parse(fPort int, _ []byte, frmPayload string, variables *map[string]database.VariableType, attributes *map[string]interface{}, device *database.Device) error { sensorsMap := make(map[string]string) - sensorsJSON, ok := (*attributes)["Sensors"].(string) + sensorsJSON, ok := (*device).Attributes["Sensors"].(string) if !ok { return fmt.Errorf("Unable to load sensor map from attributes") }