Skip to content

Commit

Permalink
Adds gw3 version to MQTT
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Sep 28, 2021
1 parent 76195d9 commit d6a7f6e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion device_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ package main
type GatewayDevice struct {
Type string `json:"type"`
FwVersion string `json:"fw_version,omitempty"`
Miio struct {
Gw3 struct {
Version string `json:"version,omitempty"`
} `json:"gw3"`
Miio struct {
Did string `json:"did,omitempty"`
} `json:"miio"`
WiFi struct {
Expand All @@ -21,6 +24,7 @@ func newGatewayDevice() *GatewayDevice {
did, mac := shellDeviceInfo()

device := &GatewayDevice{Type: "gateway"}
device.Gw3.Version = version
device.Miio.Did = did
device.WiFi.MAC = mac
devices[mac] = device
Expand Down

0 comments on commit d6a7f6e

Please sign in to comment.