hue

package
v0.0.0-...-60cc1b5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlertAllLights

func AlertAllLights(cfg Config) error

func ColorToHueHsb

func ColorToHueHsb(color colorful.Color) (int, int, int)

func ConfigureLight

func ConfigureLight(cfg Config, id string, state State) error

func GetLights

func GetLights(cfg Config) (map[string]Light, error)

Types

type Config

type Config struct {
	Endpoint string
	Username string
}

type Light

type Light struct {
	State    State  `json:"state"`
	Name     string `json:"name"`
	UniqueID string `json:"uniqueid"`
}

type State

type State struct {
	On         bool      `json:"on,omitempty"`
	Hue        int       `json:"hue,omitempty"`
	Saturation int       `json:"sat,omitempty"`
	Brightness int       `json:"bri,omitempty"`
	Effect     string    `json:"effect,omitempty"`
	XY         []float64 `json:"xy,omitempty"`
	Ct         int       `json:"ct,omitempty"`
	Alert      string    `json:"alert,omitempty"`
	ColorMode  string    `json:"colormode,omitempty"`
	Mode       string    `json:"mode,omitempty"`
	Reachable  bool      `json:"reachable,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL