colorlight

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Colorlight

type Colorlight struct {
	// contains filtered or unexported fields
}

func New

func New(id string, addr string, acc *accessory.ColoredLightbulb, httpClient *http.Client, log *logger.Logger) *Colorlight

func (*Colorlight) Brightness

func (cl *Colorlight) Brightness(brightness int)

func (*Colorlight) GetAccessory

func (cl *Colorlight) GetAccessory() *accessory.Accessory

func (*Colorlight) GetBrightness

func (cl *Colorlight) GetBrightness() int

func (*Colorlight) GetColor

func (cl *Colorlight) GetColor() colorful.Color

func (*Colorlight) GetDeviceUrl

func (cl *Colorlight) GetDeviceUrl() string

func (*Colorlight) GetState

func (cl *Colorlight) GetState() bool

func (*Colorlight) Init

func (cl *Colorlight) Init()

func (*Colorlight) LightOff

func (cl *Colorlight) LightOff()

func (*Colorlight) LightOn

func (cl *Colorlight) LightOn()

func (*Colorlight) ScheduleLightOn

func (cl *Colorlight) ScheduleLightOn()

func (*Colorlight) SetColor

func (cl *Colorlight) SetColor(color colorful.Color)

func (*Colorlight) State

func (cl *Colorlight) State(state bool)

type Response

type Response struct {
	ID         string `json:"id"`
	State      string `json:"state"`
	Brightness int    `json:"brightness"`
	Color      struct {
		R int `json:"r"`
		G int `json:"g"`
		B int `json:"b"`
	} `json:"color"`
}

Response is the esphome api response for lights

Jump to

Keyboard shortcuts

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