sensors

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry added in v0.2.0

type Registry interface {
	Open(ctx context.Context, registryPath fyne.URI) error
	Get(string) (*sensorMetadata, error)
	Set(string, *sensorMetadata) error
	Close() error
}

type SensorTracker added in v1.0.0

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

func NewSensorTracker added in v0.0.7

func NewSensorTracker(ctx context.Context, registryPath fyne.URI) *SensorTracker

func (*SensorTracker) Get added in v1.0.0

func (tracker *SensorTracker) Get(id string) *sensorState

Get fetches a sensors current tracked state

func (*SensorTracker) StartWorkers added in v1.0.0

func (tracker *SensorTracker) StartWorkers(ctx context.Context, updateCh chan interface{})

StartWorkers will call all the sensor worker functions that have been defined for this device.

func (*SensorTracker) Update added in v1.0.0

func (tracker *SensorTracker) Update(ctx context.Context, s hass.SensorUpdate, c *hass.HassConfig)

Update will send a sensor update to HA, checking to ensure the sensor is not disabled. It will also update the local registry state based on the response.

Jump to

Keyboard shortcuts

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