controller

package
v0.18.4 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 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 Configuration added in v0.17.0

type Configuration struct {
	Zones map[string][]rules.RuleConfiguration `yaml:"zones"`
	Home  []rules.RuleConfiguration            `yaml:"home"`
}

type Controller

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

A Controller creates and runs the required home and zone evaluators for a Configuration.

func New

New creates a new Controller, with the home & zone controllers required by the Configuration.

func (*Controller) ReportTasks added in v0.15.0

func (m *Controller) ReportTasks() []string

func (*Controller) Run

func (m *Controller) Run(ctx context.Context) error

Run starts all controllers and waits for them to terminate.

type Publisher added in v0.17.0

type Publisher[T any] interface {
	Subscribe() <-chan T
	Unsubscribe(<-chan T)
}

type TadoClient added in v0.17.0

type TadoClient interface {
	SetPresenceLockWithResponse(ctx context.Context, homeId tado.HomeId, body tado.SetPresenceLockJSONRequestBody, reqEditors ...tado.RequestEditorFn) (*tado.SetPresenceLockResponse, error)
	DeletePresenceLockWithResponse(ctx context.Context, homeId tado.HomeId, reqEditors ...tado.RequestEditorFn) (*tado.DeletePresenceLockResponse, error)
	SetZoneOverlayWithResponse(ctx context.Context, homeId tado.HomeId, zoneId tado.ZoneId, body tado.SetZoneOverlayJSONRequestBody, reqEditors ...tado.RequestEditorFn) (*tado.SetZoneOverlayResponse, error)
	DeleteZoneOverlayWithResponse(ctx context.Context, homeId tado.HomeId, zoneId tado.ZoneId, reqEditors ...tado.RequestEditorFn) (*tado.DeleteZoneOverlayResponse, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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