shelly-proxy/shelly2.go

30 lines
698 B
Go
Raw Normal View History

2023-12-16 14:18:09 +01:00
package main
type ShellyStatus2 struct {
Switch ShellySwitch2 `json:"switch:0"`
Sys ShellySys2 `json:"sys"`
}
type ShellySwitch2 struct {
Power float32 `json:"apower"`
Voltage float32 `json:"voltage"`
Current float32 `json:"current"`
Energy ShellyEnergy2 `json:"aenergy"`
Temperature ShellyTemperature2 `json:"temperature"`
}
type ShellyEnergy2 struct {
Total float32 `json:"total"`
ByMinute []float32 `json:"by_minute"`
MinuteTS int `json:"minute_ts"`
}
type ShellyTemperature2 struct {
Celsius float32 `json:"tC"`
Fahrenheit float32 `json:"tF"`
}
type ShellySys2 struct {
Uptime int `json:"uptime"`
}