diff --git a/internal/template/dashboard.go b/internal/template/dashboard.go index 607cf08e..82cf6124 100644 --- a/internal/template/dashboard.go +++ b/internal/template/dashboard.go @@ -75,7 +75,7 @@ func getVariableID(thingID string, variableName string, fetcher ThingFetcher) (s } for _, v := range thing.Properties { - if v.Name == variableName { + if v.VariableName == variableName { return v.Id, nil } } diff --git a/internal/template/load_test.go b/internal/template/load_test.go index 01d95bbe..18a5f71e 100644 --- a/internal/template/load_test.go +++ b/internal/template/load_test.go @@ -149,15 +149,15 @@ func (t *thingShowTest) ThingShow(thingID string) (*iotclient.ArduinoThing, erro if thingID == thingOverriddenID { return &iotclient.ArduinoThing{ Properties: []iotclient.ArduinoProperty{ - {Id: switchyOverriddenID, Name: "switchy"}, + {Id: switchyOverriddenID, VariableName: "switchy"}, }, }, nil } return &iotclient.ArduinoThing{ Properties: []iotclient.ArduinoProperty{ - {Id: switchyID, Name: "switchy"}, - {Id: relayID, Name: "relay_2"}, - {Id: blinkSpeedID, Name: "blink_speed"}, + {Id: switchyID, VariableName: "switchy"}, + {Id: relayID, VariableName: "relay_2"}, + {Id: blinkSpeedID, VariableName: "blink_speed"}, }, }, nil }