plugins

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugins

type Plugins interface {
	NewPlugin(pluginConfigFile string) error
	GetSolarWatt() float64
	GetGridWatt() float64
	Close()
}

func LoadPlugins

func LoadPlugins(confFile string) (pis []Plugins)

type SenseConfig

type SenseConfig struct {
	SenseUser         string `yaml:"senseUser"`
	SensePass         string `yaml:"sensePass"`
	SenseRefreshToken string `yaml:"senseRefreshToken"`
}

type SensePlugin

type SensePlugin struct {
	Configs SenseConfig
	// contains filtered or unexported fields
}

func (*SensePlugin) Close

func (s *SensePlugin) Close()

func (*SensePlugin) GetGridWatt

func (s *SensePlugin) GetGridWatt() (watt float64)

func (*SensePlugin) GetSolarWatt

func (s *SensePlugin) GetSolarWatt() (watt float64)

func (*SensePlugin) NewPlugin

func (s *SensePlugin) NewPlugin(pluginConfigFile string) (err error)

Jump to

Keyboard shortcuts

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