lighting

package
v0.2024.4 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Overview

Package lighting implements group lighting control for a zone. This package provides a single LightApi endpoint for controlling multiple underlying fixtures.

Index

Constants

This section is empty.

Variables

View Source
var Feature = zone.FactoryFunc(func(services zone.Services) service.Lifecycle {
	services.Logger = services.Logger.Named("lighting")
	f := &feature{
		announce: services.Node,
		devices:  services.Devices,
		clients:  services.Node,
		logger:   services.Logger,
	}
	f.Service = service.New(service.MonoApply(f.applyConfig))
	return f
})

Functions

This section is empty.

Types

type Group

type Group struct {
	traits.UnimplementedLightApiServer
	// contains filtered or unexported fields
}

Group implements traits.LightApiServer backed by a group of lights.

func (*Group) GetBrightness

func (g *Group) GetBrightness(ctx context.Context, request *traits.GetBrightnessRequest) (*traits.Brightness, error)

func (*Group) PullBrightness

func (g *Group) PullBrightness(request *traits.PullBrightnessRequest, server traits.LightApi_PullBrightnessServer) error

func (*Group) UpdateBrightness

func (g *Group) UpdateBrightness(ctx context.Context, request *traits.UpdateBrightnessRequest) (*traits.Brightness, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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