Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { Zones map[string][]RuleConfiguration `yaml:"zones"` Home []RuleConfiguration `yaml:"home"` }
func LoadRules ¶
func LoadRules(path string) (Configuration, error)
type Controllers ¶
type Controllers struct {
// contains filtered or unexported fields
}
func NewControllers ¶
func NewControllers(cfg Configuration, subscriber pubsub.Subscriber[collector.Update], tadoClient TadoClient, n notifier.Notifier, logger *slog.Logger) (*Controllers, error)
NewControllers creates a new Controllers instance, with the home & zone controllers required by the Configuration.
func (*Controllers) ReportTasks ¶
func (c *Controllers) ReportTasks() []string
type RuleConfiguration ¶
type RuleConfiguration struct { Script ScriptConfig `yaml:"script"` Name string `yaml:"name"` Users []string `yaml:"users,omitempty"` }
type ScriptConfig ¶
type TadoClient ¶
type TadoClient interface { 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) DeletePresenceLockWithResponse(ctx context.Context, homeId tado.HomeId, reqEditors ...tado.RequestEditorFn) (*tado.DeletePresenceLockResponse, error) SetPresenceLockWithResponse(ctx context.Context, homeId tado.HomeId, body tado.SetPresenceLockJSONRequestBody, reqEditors ...tado.RequestEditorFn) (*tado.SetPresenceLockResponse, error) }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.