Skip to content

Commit

Permalink
Added value to static attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
fbuedding committed Mar 29, 2024
1 parent 20d262a commit 7841c94
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions iota-types.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ type StaticAttribute struct {
ObjectID string `json:"object_id,omitempty" formam:"object_id"`
Name string `json:"name" formam:"name"`
Type string `json:"type" formam:"type"`
Value any `json:"value" formam:"value"`
Metadata map[string]Metadata `json:"metadata,omitempty" formam:"metadata"`
}

Expand Down
6 changes: 6 additions & 0 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ func TestMain(m *testing.M) {
Apikey: apiKey,
EntityType: "Test",
Autoprovision: false,
StaticAttributes: []i.StaticAttribute{{
Name: "test",
Type: "Number",
Value: 6,
Metadata: map[string]i.Metadata{},
}},
}
iota.DeleteDevice(fs, d.Id)
err := iota.CreateDevice(fs, d)
Expand Down

0 comments on commit 7841c94

Please sign in to comment.