From ab0a91d5f23f43d44ece459fe653f79e2ae0da92 Mon Sep 17 00:00:00 2001 From: Bennett Wetters Date: Sat, 13 Jan 2024 23:13:56 +0100 Subject: [PATCH] Add fields for Temperature and Humidity sensors to SpaceAPIResponseV14 --- types/v14.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/types/v14.go b/types/v14.go index 5f014ba..341013c 100644 --- a/types/v14.go +++ b/types/v14.go @@ -23,6 +23,10 @@ type SpaceAPIResponseV14 struct { ML string `json:"ml"` Matrix string `json:"matrix"` } `json:"contact"` + Sensors struct { + Temperature []EnvironmentSensor `json:"temperature"` + Humidity []EnvironmentSensor `json:"humidity"` + } `json:"sensors"` Feeds struct { Blog struct { Type string `json:"type"` @@ -39,6 +43,14 @@ type SpaceAPIResponseV14 struct { } `json:"links"` } +type EnvironmentSensor struct { + Value float32 `json:"value"` + Unit string `json:"unit"` + Location string `json:"location"` + Name string `json:"name"` + Description string `json:"description"` +} + type PersistentStateV14 struct { State struct { Open bool `json:"open"`