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 ¶
func New(cfg Configuration, p Publisher[poller.Update], c TadoClient, n notifier.Notifier, l *slog.Logger) (*Controller, error)
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
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) }
Click to show internal directories.
Click to hide internal directories.