thermostatd

package
v0.0.0-...-6a543fd Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FanSpeed

type FanSpeed string

FanSpeed describes a speed at which the fan can run at

const (
	// FanSpeedAuto will make the A/C determine what speed the fan should run at automatically
	FanSpeedAuto FanSpeed = "AUTO"
	// FanSpeedQuiet is the lowest fan speed (1/4)
	FanSpeedQuiet FanSpeed = "QUIET"
	// FanSpeedLow is the second lowest fan speed (2/4)
	FanSpeedLow FanSpeed = "LOW"
	// FanSpeedMedium is the second highest fan speed (3/4)
	FanSpeedMedium FanSpeed = "MEDIUM"
	// FanSpeedHigh is the highest fan speed (4/4)
	FanSpeedHigh FanSpeed = "HIGH"
)

type Mode

type Mode string

Mode is a mode that the thermostat can be in

const (
	// ModeCool is the cooling mode
	ModeCool Mode = "COOL"
	// ModeDry is the "dry" mode
	ModeDry Mode = "DRY"
	// ModeHeat is the heating mode
	ModeHeat Mode = "HEAT"
	// ModeFan is the fan-only mode
	ModeFan Mode = "FAN"
)

type State

type State struct {
	// PoweredOn is true if the thermostat is on
	PoweredOn bool `json:"powered_on"`
	// CurrentMode is the current mode the thermostat is in
	CurrentMode Mode `json:"current_mode"`
	// FanSpeed is the current fan speed
	FanSpeed FanSpeed `json:"fan_speed"`
	// TargetTemperature is the target temperature in Fahrenheit
	TargetTemperature int `json:"target_temperature"`
	// CurrentTemperature is the current temperature in Fahrenheit as represented by the thermometer (currently not in use)
	CurrentTemperature int `json:"current_temperature"`
}

State is a thermostat state

func GetState

func GetState(host string, key string) (*State, error)

GetState gets the state of a thermostatd instance

Jump to

Keyboard shortcuts

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