switchapp

package
v11.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package switchapp demonstrates an app that displays a switch in Home Assistant.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SwitchApp

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

func New

func New(_ context.Context) (*SwitchApp, error)

func (*SwitchApp) Configuration

func (a *SwitchApp) Configuration() []*mqttapi.Msg

func (*SwitchApp) MsgCh

func (a *SwitchApp) MsgCh() chan *mqttapi.Msg

MsgCh returns a channel through which we could pass any message to MQTT on any kind of custom event trigger or other non time-based polling.

func (*SwitchApp) Name

func (a *SwitchApp) Name() string

func (*SwitchApp) States

func (a *SwitchApp) States() []*mqttapi.Msg

func (*SwitchApp) Subscriptions

func (a *SwitchApp) Subscriptions() []*mqttapi.Subscription

func (*SwitchApp) Update

func (a *SwitchApp) Update(_ context.Context) error

Update is unused, there is no app data to update.

Jump to

Keyboard shortcuts

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