Versions in this module Expand all Collapse all v0 v0.2024.5 Jun 5, 2024 v0.2024.4 Feb 14, 2024 Changes in this version + const AutoType + var Factory auto.Factory = factory + func CountActions(actions Actions) (Actions, *ActionCounts) + type ActionCounts struct + AirTemperatureUpdates map[float64][]DeviceName + AirTemperatureWrites []string + ModeUpdates map[string]map[string][]DeviceName + ModeWrites []string + TotalWrites int + func (a ActionCounts) Changes() []string + type Actions interface + UpdateAirTemperature func(ctx context.Context, req *traits.UpdateAirTemperatureRequest, ws *WriteState) error + UpdateModeValues func(ctx context.Context, req *traits.UpdateModeValuesRequest, ws *WriteState) error + func CacheWriteAction(actions Actions, cacheExpiry time.Duration) Actions + func ClientActions(clients node.Clienter) (Actions, error) + func LogActions(actions Actions, logger *zap.Logger) Actions + type AirTemperaturePatches struct + func (o *AirTemperaturePatches) Poll(ctx context.Context, changes chan<- Patcher) error + func (o *AirTemperaturePatches) Pull(ctx context.Context, changes chan<- Patcher) error + func (o *AirTemperaturePatches) Subscribe(ctx context.Context, changes chan<- Patcher) error + type Auto struct + type DeviceName = string + type MeanOATempPatches struct + func (m *MeanOATempPatches) Subscribe(ctx context.Context, changes chan<- Patcher) error + type ModePatches struct + func (o *ModePatches) Poll(ctx context.Context, changes chan<- Patcher) error + func (o *ModePatches) Pull(ctx context.Context, changes chan<- Patcher) error + func (o *ModePatches) Subscribe(ctx context.Context, changes chan<- Patcher) error + type NilActions struct + func (_ NilActions) UpdateAirTemperature(_ context.Context, req *traits.UpdateAirTemperatureRequest, ws *WriteState) error + func (_ NilActions) UpdateModeValues(_ context.Context, req *traits.UpdateModeValuesRequest, ws *WriteState) error + type OccupancySensorPatches struct + func (o *OccupancySensorPatches) Poll(ctx context.Context, changes chan<- Patcher) error + func (o *OccupancySensorPatches) Pull(ctx context.Context, changes chan<- Patcher) error + func (o *OccupancySensorPatches) Subscribe(ctx context.Context, changes chan<- Patcher) error + type PatchFunc func(s *ReadState) + func (p PatchFunc) Patch(s *ReadState) + type Patcher interface + Patch func(s *ReadState) + type ReadState struct + AirTemperature map[DeviceName]Value[*traits.AirTemperature] + Config config.Root + MeanOATemp *types.Temperature + Modes map[DeviceName]map[string]Value[string] + Now func() time.Time + Occupancy map[DeviceName]Value[*traits.Occupancy] + StartTime time.Time + func NewReadState() *ReadState + func (s *ReadState) Clone() *ReadState + type UnexpectedResponseError struct + Got any + Message string + Want any + func (u UnexpectedResponseError) Error() string + type Value struct + At time.Time + Err error + Hit int + V V + type WriteState struct + AirTemperatures map[DeviceName]Value[*traits.AirTemperature] + Modes map[DeviceName]Value[*traits.ModeValues] + Now func() time.Time + Reasons []string + T0 time.Time + T1 time.Time + func NewWriteState() *WriteState + func (ws *WriteState) AddReason(reason string) + func (ws *WriteState) AddReasonf(format string, args ...any) + func (ws *WriteState) After() + func (ws *WriteState) Before() + func (ws *WriteState) CopyFromReadState(rs *ReadState) v0.2024.3 Feb 8, 2024 v0.2024.2 Feb 8, 2024 v0.2024.1 Feb 8, 2024 v0.0.0-test-multiarch Jun 7, 2024