Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aircon ¶
type Aircon struct { Info AirconInfo `json:"info"` Zones map[string]AirconZone `json:"zones"` }
func (*Aircon) GetZoneByID ¶
func (a *Aircon) GetZoneByID(id string) *AirconZone
func (*Aircon) GetZoneByName ¶
func (a *Aircon) GetZoneByName(name string) *AirconZone
func (*Aircon) GetZoneByNumber ¶
func (a *Aircon) GetZoneByNumber(number int64) *AirconZone
type AirconFanSpeed ¶
type AirconFanSpeed string
const ( AirconFanSpeedLow AirconFanSpeed = "low" AirconFanSpeedMedium AirconFanSpeed = "medium" AirconFanSpeedHigh AirconFanSpeed = "high" AirconFanSpeedAuto AirconFanSpeed = "auto" )
type AirconInfo ¶
type AirconMode ¶
type AirconMode string
const ( AirconModeCool AirconMode = "cool" AirconModeHeat AirconMode = "heat" AirconModeFan AirconMode = "fan" AirconModeDry AirconMode = "dry" )
type AirconState ¶
type AirconState string
const ( AirconStateOpen AirconState = "on" AirconStateClose AirconState = "off" )
type AirconZone ¶
type AirconZoneState ¶
type AirconZoneState string
const ( AirconZoneStateOpen AirconZoneState = "open" AirconZoneStateClose AirconZoneState = "close" )
type Change ¶
type Change interface { SetAirconState(aircon string, state AirconState) Change // SetAirconState turns an aircon on or off. SetAirconMode(aircon string, mode AirconMode) Change // SetAirconMode sets the mode of an aircon, e.g. heating/cooling. SetAirconFan(aircon string, speed AirconFanSpeed) Change // SetAirconFan sets the fan speed of an aircon. SetAirconZoneTemperature(aircon string, zone string, temperature int64) Change // SetAirconZoneTemperature sets the temperature of a zone. SetAirconZoneState(aircon string, zone string, state AirconZoneState) Change // SetAirconZoneState opens or closes airflow to a zone. }
Change is the interface for building a change to the system.
type Client ¶
type Client interface { // GetSystemInfo returns the system info the hub responds with by default. GetSystemInfo(ctx context.Context) (string, error) // GetSystemData returns the current state of the system. GetSystemData(ctx context.Context) (*SystemData, error) // SetAircon sets the state of the aircon. SetAircon(ctx context.Context, change Change) error }
Client is the interface for interacting with the Advantage Air hub.
type SetResponse ¶
type System ¶
type System struct { ServiceVersion string `json:"aaServiceRev"` DeviceNames map[string]string `json:"deviceNames"` AppRevision string `json:"myAppRev"` Name string `json:"name"` NeedsUpdate bool `json:"needsUpdate"` TSPErrorCode string `json:"tspErrorCode"` TSPIP string `json:"tspIp"` TSPModel string `json:"tspModel"` }
type SystemData ¶
func (*SystemData) GetAirconByID ¶
func (s *SystemData) GetAirconByID(id string) *Aircon
func (*SystemData) GetAirconByName ¶
func (s *SystemData) GetAirconByName(name string) *Aircon
Click to show internal directories.
Click to hide internal directories.