config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeColorLight  = "colorlight"
	TypeTemperature = "temperature"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LogLevel    string `cli:"logLevel" env:"LOG_LEVEL"`
	LogConsole  bool   `cli:"logConsole" env:"LOG_CONSOLE"`
	Pin         string `cli:"pin" env:"HOMEKIT_PIN"`
	ConfigFile  string `cli:"config" env:"CONFIG_FILE"`
	StoragePath string `cli:"storage" env:"STORAGE_PATH"`
}

func New

func New() Config

type EsphomeDevice

type EsphomeDevice struct {
	ID               string `json:"id"`
	Name             string `json:"name"`
	Addr             string `json:"addr"`
	Type             string `json:"type"`
	SerialNumber     string `json:"serial_number"`
	Manufacturer     string `json:"manufacturer"`
	Model            string `json:"model"`
	FirmwareRevision string `json:"firmware_revision"`
}

EsphomeDevice holds the configuration for one device

type EsphomeDevices

type EsphomeDevices []EsphomeDevice

EsphomeDevices is the list of esphome devices in config file

func NewEsphomeDevicesFromFile

func NewEsphomeDevicesFromFile(filename string) (EsphomeDevices, error)

NewEsphomeDevicesFromFile reads a JSON config file and returns all devices

Jump to

Keyboard shortcuts

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