fix: temperature, sensor
changes: - sensor temperature add - sensor temperature list - sensor temperature rm - temperature get - temperature log - temperature push
This commit is contained in:
@ -8,8 +8,9 @@ import (
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
DeviceID string `json:"device_id"`
|
||||
Remotes []*Remote `json:"remotes"`
|
||||
DeviceID string `json:"device_id"`
|
||||
Remotes []*Remote `json:"remotes"`
|
||||
TemperatureSensors []*WireSensor `json:"temperature_sensors"`
|
||||
}
|
||||
|
||||
func (c *Config) ToJSON() (string, error) {
|
||||
@ -43,6 +44,13 @@ func (c *Config) JSONDecoder(r io.Reader) error {
|
||||
}
|
||||
|
||||
type Remote struct {
|
||||
Name string `json:"remote_name"`
|
||||
Address string `json:"remote_address"`
|
||||
Name string `json:"remote_name"`
|
||||
Address string `json:"remote_address"`
|
||||
Registered bool `json:"remote_registered"`
|
||||
}
|
||||
|
||||
type WireSensor struct {
|
||||
ID string `json:"sensor_id"`
|
||||
Name string `json:"sensor_name"`
|
||||
WirePath string `json:"wire_path"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user