Added Device info to json temperature.
This commit is contained in:
parent
8a80c8a609
commit
9f63e537c0
17
messages.go
17
messages.go
|
|
@ -149,12 +149,19 @@ type MotionMessage struct {
|
|||
Source Source `json:"source,omitempty"`
|
||||
}
|
||||
|
||||
type TemperatureDevice struct {
|
||||
Address string `json:"address"`
|
||||
Battery int `json:"battery"`
|
||||
Model string `json:"model"`
|
||||
}
|
||||
|
||||
type TemperatureMessage struct {
|
||||
Header MessageHeader `json:"header,omitempty"`
|
||||
Celsius float32 `json:"celsius,omitempty"`
|
||||
Humidity float32 `json:"humidity,omitempty"`
|
||||
Fahrenheit float32 `json:"fahrenheit,omitempty"`
|
||||
Time time.Time `json:"time,omitempty"`
|
||||
Header MessageHeader `json:"header,omitempty"`
|
||||
Celsius float32 `json:"celsius,omitempty"`
|
||||
Humidity float32 `json:"humidity,omitempty"`
|
||||
Fahrenheit float32 `json:"fahrenheit,omitempty"`
|
||||
Time time.Time `json:"time,omitempty"`
|
||||
Device TemperatureDevice `json:"device,omitempty"`
|
||||
}
|
||||
|
||||
type SuccessMessage struct {
|
||||
|
|
|
|||
Loading…
Reference in New Issue