config

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

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

Go to latest
Published: May 9, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	HomeAssistant HomeAssistantConfig      `yaml:"home_assistant"`
	Settings      *SettingsConfig          `yaml:"settings"`
	People        map[string]*PeopleConfig `yaml:"people"`
}

Config is the main configuration data structure

type Configuration

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

func NewConfiguration

func NewConfiguration(configPath string) *Configuration

func (*Configuration) Open

func (a *Configuration) Open() (*Config, error)

Open configuration from disk.

func (*Configuration) OpenReader

func (a *Configuration) OpenReader(r io.Reader) (*Config, error)

Open configuration from a reader.

type HassioOptionPerson

type HassioOptionPerson struct {
	ID           string   `json:"id"`
	FriendlyName string   `json:"friendly_name"`
	Devices      []string `json:"devices"`
}

type HassioOptionTrackerStatesConfig

type HassioOptionTrackerStatesConfig struct {
	JustArrivedTime  int    `json:"just_arrived_time"`
	JustLeftTime     int    `json:"just_left_time"`
	HomeState        string `json:"home_state"`
	JustLeftState    string `json:"just_left_state"`
	JustArrivedState string `json:"just_arrived_state"`
	AwayState        string `json:"away_state"`
}

type HassioOptionsConfig

type HassioOptionsConfig struct {
	LogLevel string                           `json:"log_level"`
	Tracking *HassioOptionTrackerStatesConfig `json:"tracking"`
	Persons  []HassioOptionPerson             `json:"persons"`
}

type HomeAssistantConfig

type HomeAssistantConfig struct {
	IP    string `yaml:"ip"`
	SSL   bool   `yaml:"ssl"`
	Token string `yaml:"token"`
}

HomeAssistantConfig is the configuration for the Home Assistant platform integration

type PeopleConfig

type PeopleConfig struct {
	FriendlyName string   `yaml:"friendly_name"`
	Devices      []string `yaml:"devices"`
	State        string
	Attributes   map[string]interface{}
}

PeopleConfig is the configuration for the Home Assistant platform integration

type SettingsConfig

type SettingsConfig struct {
	TrackingSettings *TrackingStateSettingsConfig `yaml:"tracking"`
}

SettingsConfig let you tweak the settings of the daemon

type TrackingStateSettingsConfig

type TrackingStateSettingsConfig struct {
	JustArrivedTime  int    `yaml:"just_arrived_time"`
	JustLeftTime     int    `yaml:"just_left_time"`
	HomeState        string `yaml:"home_state"`
	JustLeftState    string `yaml:"just_left_state"`
	JustArrivedState string `yaml:"just_arrived_state"`
	AwayState        string `yaml:"away_state"`
}

Jump to

Keyboard shortcuts

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