tv

package
v1.0.34 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: Unlicense Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Status

type Status struct {
	Volume int  `json:"volume"`
	Input  int  `json:"input"`
	Power  bool `json:"power"`
}

type TV

type TV struct {
	WakeOnLan      bool                `yaml:"tv_wake_on_lan"`
	Brand          string              `yaml:"tv_brand"`
	IP             string              `yaml:"tv_ip"`
	MAC            string              `yaml:"tv_mac"`
	DefaultVolume  int                 `yaml:"tv_default_volume"`
	DefaultInput   int                 `yaml:"tv_default_input"`
	WebSocketPort  string              `yaml:"websocket_port"`
	LGClientKey    string              `yaml:"lg_client_key"`
	VizioAuthToken string              `yaml:"vizio_auth_token"`
	TimeoutSeconds int                 `yaml:"timeout_seconds"`
	LG             *lg_tv.Controller   `yaml:"-"`
	HDMICEC        hdmi_cec.Controller `yaml:"-"`
}

func New

func New(config *types.ConfigFile) (result *TV)

func (*TV) GetInput

func (tv *TV) GetInput() (result int)

func (*TV) GetPowerStatus

func (tv *TV) GetPowerStatus() (result bool)

func (*TV) GetVolume

func (tv *TV) GetVolume() (result int)

func (*TV) MuteOff

func (tv *TV) MuteOff()

func (*TV) MuteOn

func (tv *TV) MuteOn()

func (*TV) PowerOff

func (tv *TV) PowerOff()

func (*TV) PowerOn

func (tv *TV) PowerOn()

func (*TV) Prepare

func (tv *TV) Prepare()

func (*TV) SetInput

func (tv *TV) SetInput(hdmi_input int)

func (*TV) SetVolume

func (tv *TV) SetVolume(volume_level int)

func (*TV) Status

func (tv *TV) Status() (result Status)

Jump to

Keyboard shortcuts

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