mirror of
https://github.com/gosticks/go-hue-interface.git
synced 2025-10-16 11:45:35 +00:00
add light level for api 1.28 support
This commit is contained in:
parent
521d044b57
commit
a5fe5e1feb
37
groups.go
37
groups.go
@ -51,18 +51,18 @@ const (
|
|||||||
|
|
||||||
// Group hue type
|
// Group hue type
|
||||||
type Group struct {
|
type Group struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
LightIDs []string `json:"lights"`
|
LightIDs []string `json:"lights"`
|
||||||
SensorIDs []string `json:"sensors"`
|
SensorIDs []string `json:"sensors"`
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
State *GroupState `json:"state"`
|
State *GroupState `json:"state"`
|
||||||
Recycle bool `json:"recycle"`
|
Recycle bool `json:"recycle"`
|
||||||
ModelID string `json:"modelid,omitempty"`
|
ModelID string `json:"modelid,omitempty"`
|
||||||
UniqueID string `json:"uniqueid,omitempty"`
|
UniqueID string `json:"uniqueid,omitempty"`
|
||||||
Class string `json:"class,omitempty"`
|
Class string `json:"class,omitempty"`
|
||||||
Action LightState `json:"action"`
|
Action LightState `json:"action"`
|
||||||
Presence *GroupPresence `json:"presence,omitempty"`
|
Presence *GroupPresence `json:"presence,omitempty"`
|
||||||
// Lightlevel..
|
LightLevel *GroupLightLevel `json:"lightlevel,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GroupPresence only exists if sensors array contains a presence sensor of type “ZLLPresence”, “CLIPPresence” or “Geofence”. This object contains a state object which contains the aggregated state of the sensors
|
// GroupPresence only exists if sensors array contains a presence sensor of type “ZLLPresence”, “CLIPPresence” or “Geofence”. This object contains a state object which contains the aggregated state of the sensors
|
||||||
@ -73,6 +73,19 @@ type GroupPresence struct {
|
|||||||
PresenceAll bool `json:"presence_all"`
|
PresenceAll bool `json:"presence_all"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GroupLightLevel light level struct
|
||||||
|
type GroupLightLevel struct {
|
||||||
|
// State?
|
||||||
|
LastUpdated Time `json:"lastupdated"`
|
||||||
|
Dark bool `json:"dark"`
|
||||||
|
DarkAll bool `json:"dark_all"`
|
||||||
|
Daylight bool `json:"daylight"`
|
||||||
|
DaylightAny bool `json:"daylight_any"`
|
||||||
|
Level int `json:"lightlevel"`
|
||||||
|
LevelMin int `json:"lightlevel_min"`
|
||||||
|
LevelMax int `json:"lightlevel_max"`
|
||||||
|
}
|
||||||
|
|
||||||
// GroupCreateResponse is returned after a create group request
|
// GroupCreateResponse is returned after a create group request
|
||||||
type GroupCreateResponse struct {
|
type GroupCreateResponse struct {
|
||||||
Success struct {
|
Success struct {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user