brightness

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Entry

func Entry(args []string)

Entry point for the brightness on commands. Checks the arguments and decides what is required to do.

Types

type Control

type Control struct {
	Device string     `json:"device"`
	Model  string     `json:"model"`
	Cmd    ControlCmd `json:"cmd"`
}

Control struct manages the control json data that will be send to govee.

func (*Control) Send

func (c *Control) Send(d devices.Device, conn general.Connection, power int) []byte

Send sends all the data to govee to set the value of the brightness

type ControlCmd

type ControlCmd struct {
	Name  string `json:"name"`
	Value int    `json:"value"`
}

ControlCmd is the control command json that will be sent to govee.

type Response

type Response struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

Response struct is for parsing the json returned by govee.

func (*Response) Fill

func (r *Response) Fill(c []byte)

Fill fills the response struct with the data provided by govee.

Jump to

Keyboard shortcuts

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