device

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name    = "go-hass-agent"
	Version = "0.0.3"
)

Variables

This section is empty.

Functions

func ExternalIPUpdater added in v0.0.4

func ExternalIPUpdater(ctx context.Context, status chan interface{})

func GenerateRegistrationRequest

func GenerateRegistrationRequest(d DeviceInfo) *hass.RegistrationRequest

func GetDeviceInfo

func GetDeviceInfo(d DeviceInfo)

func NewDevice

func NewDevice(ctx context.Context) *linuxDevice

func SetupContext

func SetupContext(ctx context.Context) context.Context

func UpdateExternalIPSensors added in v0.1.0

func UpdateExternalIPSensors(ctx context.Context, status chan interface{})

Types

type DeviceInfo

type DeviceInfo interface {
	DeviceID() string
	AppID() string
	AppName() string
	AppVersion() string
	DeviceName() string
	Manufacturer() string
	Model() string
	OsName() string
	OsVersion() string
	SupportsEncryption() bool
	AppData() interface{}
}

type SensorInfo

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

func NewSensorInfo

func NewSensorInfo() *SensorInfo

func (*SensorInfo) Add

func (i *SensorInfo) Add(name string, workerFunc func(context.Context, chan interface{}))

func (*SensorInfo) Get

func (i *SensorInfo) Get() map[string]func(context.Context, chan interface{})

Jump to

Keyboard shortcuts

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