Documentation ¶
Index ¶
- Constants
- func ListDevicesWithRetries(s *sdm.Service, c *config.Config) *sdm.GoogleHomeEnterpriseSdmV1ListDevicesResponse
- type EmulatedDevice
- func (d *EmulatedDevice) CurrentMode() int
- func (d *EmulatedDevice) CurrentTemp() float64
- func (d *EmulatedDevice) DisplayUnit() int
- func (d *EmulatedDevice) ForceUpdate() error
- func (d *EmulatedDevice) ListenEvents() error
- func (d *EmulatedDevice) SetTargetMode(n int) error
- func (d *EmulatedDevice) SetTargetTemp(t float64) error
- func (d *EmulatedDevice) SetupHandlers()
- func (d *EmulatedDevice) TargetMode() int
- func (d *EmulatedDevice) TargetTemp() float64
- func (d *EmulatedDevice) UpdateTraits(t PubsubUpdate)
- type PubsubUpdate
Constants ¶
View Source
const ( OFF = "OFF" HEAT = "HEAT" COOL = "COOL" HEATCOOL = "HEATCOOL" )
Variables ¶
This section is empty.
Functions ¶
func ListDevicesWithRetries ¶
Types ¶
type EmulatedDevice ¶
type EmulatedDevice struct { *sdmclient.DeviceEndpoint *sync.Mutex *service.Thermostat // contains filtered or unexported fields }
func NewEmulatedDevice ¶
func NewEmulatedDevice(ctx context.Context, c *config.Config, t *service.Thermostat) (*EmulatedDevice, error)
func (*EmulatedDevice) CurrentMode ¶
func (d *EmulatedDevice) CurrentMode() int
func (*EmulatedDevice) CurrentTemp ¶
func (d *EmulatedDevice) CurrentTemp() float64
func (*EmulatedDevice) DisplayUnit ¶
func (d *EmulatedDevice) DisplayUnit() int
func (*EmulatedDevice) ForceUpdate ¶
func (d *EmulatedDevice) ForceUpdate() error
func (*EmulatedDevice) ListenEvents ¶
func (d *EmulatedDevice) ListenEvents() error
func (*EmulatedDevice) SetTargetMode ¶
func (d *EmulatedDevice) SetTargetMode(n int) error
func (*EmulatedDevice) SetTargetTemp ¶
func (d *EmulatedDevice) SetTargetTemp(t float64) error
func (*EmulatedDevice) SetupHandlers ¶
func (d *EmulatedDevice) SetupHandlers()
func (*EmulatedDevice) TargetMode ¶
func (d *EmulatedDevice) TargetMode() int
func (*EmulatedDevice) TargetTemp ¶
func (d *EmulatedDevice) TargetTemp() float64
func (*EmulatedDevice) UpdateTraits ¶
func (d *EmulatedDevice) UpdateTraits(t PubsubUpdate)
type PubsubUpdate ¶
type PubsubUpdate struct { Timestamp time.Time ResourceUpdate struct { Traits sdmclient.DeviceTraits } }
Click to show internal directories.
Click to hide internal directories.