home

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadHomeRules

func LoadHomeRules(cfg configuration.HomeConfiguration, update poller.Update, logger *slog.Logger) (rules.Rules, error)

Types

type AutoAwayRule

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

func LoadAutoAwayRule

func LoadAutoAwayRule(cfg configuration.AutoAwayConfiguration, update poller.Update, logger *slog.Logger) (AutoAwayRule, error)

func (AutoAwayRule) Evaluate

func (a AutoAwayRule) Evaluate(update poller.Update) (action.Action, error)

type Controller

type Controller struct {
	*processor.Processor
}

func New

func New(tadoClient action.TadoClient, p poller.Poller, bot notifier.SlackSender, configuration configuration.HomeConfiguration, logger *slog.Logger) *Controller

type State

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

func (State) Do

func (s State) Do(ctx context.Context, setter action.TadoClient) error

func (State) IsEqual

func (s State) IsEqual(state action.State) bool

func (State) LogValue

func (s State) LogValue() slog.Value

func (State) Mode

func (s State) Mode() action.Mode

func (State) String

func (s State) String() string

Jump to

Keyboard shortcuts

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