hue hue hue
This commit is contained in:
+13
-7
@@ -3,6 +3,7 @@ package events
|
||||
import (
|
||||
"fmt"
|
||||
"git.aiterp.net/lucifer3/server/device"
|
||||
"git.aiterp.net/lucifer3/server/internal/color"
|
||||
)
|
||||
|
||||
type DeviceConnected struct {
|
||||
@@ -23,13 +24,16 @@ func (e DeviceDisconnected) EventDescription() string {
|
||||
}
|
||||
|
||||
type HardwareState struct {
|
||||
ID string `json:"internalId"`
|
||||
InternalName string `json:"internalName"`
|
||||
SupportFlags device.SupportFlags `json:"deviceFlags"`
|
||||
ColorFlags device.ColorFlag `json:"colorFlags"`
|
||||
Buttons []string `json:"buttons"`
|
||||
State device.State `json:"state"`
|
||||
Unreachable bool `json:"unreachable"`
|
||||
ID string `json:"internalId"`
|
||||
InternalName string `json:"internalName"`
|
||||
SupportFlags device.SupportFlags `json:"supportFlags"`
|
||||
ColorFlags device.ColorFlags `json:"colorFlags"`
|
||||
ColorGamut *color.Gamut `json:"colorGamut,omitempty"`
|
||||
TemperatureRange *[2]int `json:"temperatureRange,omitempty"`
|
||||
Buttons []string `json:"buttons"`
|
||||
State device.State `json:"state"`
|
||||
BatteryPercentage *int `json:"batteryPercentage"`
|
||||
Unreachable bool `json:"unreachable"`
|
||||
}
|
||||
|
||||
func (e HardwareState) EventDescription() string {
|
||||
@@ -38,6 +42,8 @@ func (e HardwareState) EventDescription() string {
|
||||
)
|
||||
}
|
||||
|
||||
// HardwareMetadata contains things that has no bearing on the functionality of
|
||||
// lucifer, but may be interesting to have in the GUI.
|
||||
type HardwareMetadata struct {
|
||||
ID string `json:"id"`
|
||||
X int `json:"x,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user