hassclient

package
v0.0.0-...-824191b Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidResponse = errors.New("invalid response")

Functions

This section is empty.

Types

type HassClient

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

func Connect

func Connect(url, token string) *HassClient

func (*HassClient) Close

func (client *HassClient) Close()

func (*HassClient) SendNotification

func (client *HassClient) SendNotification(deviceId, title, message string, config NotificationConfig) error

func (*HassClient) SubscribeStateChanges

func (client *HassClient) SubscribeStateChanges() (<-chan StateChange, func())

type NotificationConfig

type NotificationConfig struct {
	Tag     string
	Group   string
	Channel string
}

type StateChange

type StateChange struct {
	EntityId string
	OldState string
	NewState string
}

Jump to

Keyboard shortcuts

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