gotado

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

README

gotado

Build Actions Status Go Report Card PkgGoDev

Go client for the tado° Web API. Still in early development, so only a subset of the API functionality is implemented.

Installation

Install gotado with go get:

go get github.com/gonzolino/gotado

Then you can import "github.com/gonzolino/gotado" in your packages. Have a look at the examples directory to see example code.

Usage

Authentication

Besides your tado° username and password you need a clientId and clientSecret to authenticate with the tado° API. One way to get those is to grab them from https://my.tado.com/webapp/env.js.

Code Examples

Get started by creating an authenticated client object:

client, err := gotado.NewClient("cliendId", "clientSecret").WithCredentials(context.TODO(), "username", "password")

With the client you can start using the gotado functions:

user, err := gotado.GetMe(client)
fmt.Printf("User Email: %s\n", user.Email)

home, err := gotado.GetHome(client, &user.Homes[0])
fmt.Printf("Home Address:\n%s\n%s %s\n", *home.Address.AddressLine1, *home.Address.ZipCode, *home.Address.City)

Just have a look at the package documentation to learn more about whats possible.

Contributing

Please feel free to submit issues and/or pull requests if you discover bugs or missing features.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteMobileDevice added in v0.3.0

func DeleteMobileDevice(client *Client, userHome *UserHome, mobileDevice *MobileDevice) error

DeleteMobileDevice deletes the given mobile device

func DeleteZoneOverlay added in v0.2.0

func DeleteZoneOverlay(client *Client, userHome *UserHome, zone *Zone) error

DeleteZoneOverlay removes an overlay from a zone, thereby returning a zone to smart schedule

func DisableEarlyStart added in v0.3.0

func DisableEarlyStart(client *Client, userHome *UserHome, zone *Zone) error

DisableEarlyStart disables early start in the given zone

func EnableEarlyStart added in v0.3.0

func EnableEarlyStart(client *Client, userHome *UserHome, zone *Zone) error

EnableEarlyStart enables early start in the given zone

func IsEarlyStartEnabled added in v0.3.0

func IsEarlyStartEnabled(client *Client, userHome *UserHome, zone *Zone) (bool, error)

IsEarlyStartEnabled returns if the given zone has turned on early start

func SetActiveTimetable added in v0.2.0

func SetActiveTimetable(client *Client, userHome *UserHome, zone *Zone, timetable *ScheduleTimetable) error

SetActiveTimetable sets the active schedule timetable for the given zone

func SetAwayComfortLevel added in v0.3.0

func SetAwayComfortLevel(client *Client, userHome *UserHome, zone *Zone, comfortLevel int32) error

SetAwayComfortLevel sets the away configuration to auto-adjust at the given comfort level ("preheat"). Allowed values got the comfort level are 0, 50 and 100 (Eco, Balanced, Comfort)

func SetAwayConfiguration added in v0.3.0

func SetAwayConfiguration(client *Client, userHome *UserHome, zone *Zone, awayConfig *AwayConfiguration) error

SetAwayConfiguration sets an away configuration for the given zone

func SetAwayTemperature added in v0.3.0

func SetAwayTemperature(client *Client, userHome *UserHome, zone *Zone, temperature float64) error

SetAwayTemperature sets the manual temperature for a zone when everybody leaves the house

func SetMobileDeviceSettings added in v0.3.0

func SetMobileDeviceSettings(client *Client, userHome *UserHome, mobileDevice *MobileDevice, settings MobileDeviceSettings) error

SetMobileDeviceSettings updates the given mobile device with the given settings

func SetPresenceAuto added in v0.3.0

func SetPresenceAuto(client *Client, userHome *UserHome) error

SetPresenceAuto removes a locked geofencing presence and returns to auto mode

func SetPresenceAway added in v0.3.0

func SetPresenceAway(client *Client, userHome *UserHome) error

SetPresenceAway sets the geofencing presence to 'away'

func SetPresenceHome added in v0.3.0

func SetPresenceHome(client *Client, userHome *UserHome) error

SetPresenceHome sets the geofencing presence to 'at home'

func SetSchedule added in v0.2.0

func SetSchedule(client *Client, userHome *UserHome, zone *Zone, timetable *ScheduleTimetable, schedule []*ScheduleBlock) error

SetSchedule sets the heating schedule for one block of the given zone

func SetWindowClosed

func SetWindowClosed(client *Client, userHome *UserHome, zone *Zone) error

SetWindowClosed marks the window in a zone as closed

func SetWindowOpen

func SetWindowOpen(client *Client, userHome *UserHome, zone *Zone) error

SetWindowOpen marks the window in a zone as open (open window must have been detected before)

func SetZoneOverlayHeatingOff added in v0.2.0

func SetZoneOverlayHeatingOff(client *Client, userHome *UserHome, zone *Zone) error

SetZoneOverlayHeatingOff turns off heating in a zone

Types

type AwayConfiguration added in v0.3.0

type AwayConfiguration struct {
	Type       string `json:"type"`
	AutoAdjust bool   `json:"autoAdjust"`
	// Comfort Level must be 0 (Eco), 50 (Balanced) or 100 (Comfort)
	ComfortLevel int32                     `json:"comfortLevel"`
	Setting      *AwayConfigurationSetting `json:"setting"`
}

AwayConfiguration holds the settings to use when everybody leaves the house

func GetAwayConfiguration added in v0.3.0

func GetAwayConfiguration(client *Client, userHome *UserHome, zone *Zone) (*AwayConfiguration, error)

GetAwayConfiguration returns the away configuration of the given zone

type AwayConfigurationSetting added in v0.3.0

type AwayConfigurationSetting struct {
	Type        string                               `json:"type"`
	Power       string                               `json:"power"`
	Temperature *AwayConfigurationSettingTemperature `json:"temperature,omitempty"`
}

AwayConfigurationSetting holds the setting of an away configuration

type AwayConfigurationSettingTemperature added in v0.3.0

type AwayConfigurationSettingTemperature struct {
	Celsius    float64 `json:"celsius"`
	Fahrenheit float64 `json:"fahrenheit"`
}

AwayConfigurationSettingTemperature holds the temperature of an away configuration setting

type Client

type Client struct {
	// ClientID specifies the client ID to use for authentication
	ClientID string
	// ClientSecret specifies the client secret to use for authentication
	ClientSecret string
	// contains filtered or unexported fields
}

Client to access the tado° API

func NewClient

func NewClient(clientID, clientSecret string) *Client

NewClient creates a new tado° client

func (*Client) Do added in v0.2.0

func (c *Client) Do(req *http.Request) (*http.Response, error)

Do sends the given HTTP request to the tado° API.

func (*Client) Request

func (c *Client) Request(method, url string, body io.Reader) (*http.Response, error)

Request performs an HTTP request to the tado° API

func (*Client) WithCredentials

func (c *Client) WithCredentials(ctx context.Context, username, password string) (*Client, error)

WithCredentials sets the given credentials and scopes for the tado° API

func (*Client) WithTimeout

func (c *Client) WithTimeout(timeout time.Duration) *Client

WithTimeout configures the tado° object with the given timeout for HTTP requests.

type Device added in v0.3.0

type Device struct {
	DeviceType       string                `json:"deviceType"`
	SerialNo         string                `json:"serialNo"`
	ShortSerialNo    string                `json:"shortSerialNo"`
	CurrentFwVersion string                `json:"currentFwVersion"`
	ConnectionState  DeviceConnectionState `json:"connectionState"`
	Characteristics  DeviceCharacteristics `json:"characteristics"`
	InPairingMode    *bool                 `json:"inPairingMode,omitempty"`
	MountingState    *DeviceMountingState  `json:"mountingState,omitempty"`
	BatteryState     *string               `json:"batteryState,omitempty"`
	ChildLockEnabled *bool                 `json:"childLockEnabled,omitempty"`
	GatewayOperation *string               `json:"gatewayOperation,omitempty"`
}

Device represents a tado° device such as a thermostat or a bridge

func GetDevices added in v0.3.0

func GetDevices(client *Client, userHome *UserHome) ([]*Device, error)

GetDevices lists all devices in the given home

type DeviceCharacteristics added in v0.3.0

type DeviceCharacteristics struct {
	Capabilities []string `json:"characteristics"`
}

DeviceCharacteristics lists the capabilities of a device

type DeviceConnectionState added in v0.3.0

type DeviceConnectionState struct {
	Value     bool   `json:"value"`
	Timestamp string `json:"timestamp"`
}

DeviceConnectionState specifies if the device is connected or not

type DeviceMountingState added in v0.3.0

type DeviceMountingState struct {
	Value     string `json:"value"`
	Timestamp string `json:"timestamp"`
}

DeviceMountingState holds the mounting state of a device, e.g. if it is calibrated

type EarlyStart added in v0.3.0

type EarlyStart struct {
	Enabled bool `json:"enabled"`
}

EarlyStart controls whether tado° ensures that a set temperature is reached at the start of a block.

type Home

type Home struct {
	ID              int32  `json:"id"`
	Name            string `json:"name"`
	DateTimeZone    string `json:"dateTimeZone"`
	DateCreated     string `json:"dateCreated"`
	TemperatureUnit string `json:"temperatureUnit"`
	// TODO partner missing
	SimpleSmartScheduleEnabled bool                  `json:"simpleSmartScheduleEnabled"`
	AwayRadiusInmeters         float32               `json:"awayRadiusInMeters"`
	InstallationCompleted      bool                  `json:"installationCompleted"`
	IncidentDetection          HomeIncidentDetection `json:"incidentDetection"`
	AutoAssistFreeTrialEnabled bool                  `json:"autoAssistFreeTrialEnabled"`
	Skills                     []string              `json:"skills"`
	ChristmasModeEnabled       bool                  `json:"christmasModeEnabled"`
	ShowAutoAssistReminders    bool                  `json:"showAutoAssistReminders"`
	ContactDetails             HomeContactDetails    `json:"contactDetails"`
	Address                    HomeAddress           `json:"address"`
	Geolocation                HomeGeolocation       `json:"geolocation"`
	ConsentGrantSkippable      bool                  `json:"consentGrantSkippable"`
}

Home represents a home equipped with tado°

func GetHome

func GetHome(client *Client, userHome *UserHome) (*Home, error)

GetHome returns information about the given home

type HomeAddress

type HomeAddress struct {
	AddressLine1 *string `json:"addressLine1"`
	AddressLine2 *string `json:"addressLine2"`
	ZipCode      *string `json:"zipCode"`
	City         *string `json:"city"`
	State        *string `json:"state"`
	Country      *string `json:"country"`
}

HomeAddress holds the address of a home

type HomeContactDetails

type HomeContactDetails struct {
	Name  *string `json:"name"`
	Email *string `json:"email"`
	Phone *string `json:"phone"`
}

HomeContactDetails holds the contact details for a home

type HomeGeolocation

type HomeGeolocation struct {
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
}

HomeGeolocation holds the coordinates of a home

type HomeIncidentDetection

type HomeIncidentDetection struct {
	Supported bool `json:"supported"`
	Enabled   bool `json:"enabled"`
}

HomeIncidentDetection holds incident detection options for a home

type HomeState added in v0.3.0

type HomeState struct {
	Presence       string `json:"presence"`
	PresenceLocked bool   `json:"presenceLocked"`
}

HomeState represents the state of a tado° home

func GetHomeState added in v0.3.0

func GetHomeState(client *Client, userHome *UserHome) (*HomeState, error)

GetHomeState returns the state of the given home

type Installation added in v0.3.0

type Installation struct {
	ID       int32    `json:"id"`
	Type     string   `json:"type"`
	Revision int32    `json:"revision"`
	State    string   `json:"state"`
	Devices  []Device `json:"devices"`
}

Installation holds information about a tado° hardware installation

func GetInstallations added in v0.3.0

func GetInstallations(client *Client, userHome *UserHome) ([]*Installation, error)

GetInstallations lists all installations in the given home

type MobileDevice added in v0.3.0

type MobileDevice struct {
	Name           string                `json:"name"`
	ID             int32                 `json:"id"`
	Settings       MobileDeviceSettings  `json:"settings"`
	Location       *MobileDeviceLocation `json:"location"`
	DeviceMetadata MobileDeviceMetadata  `json:"deviceMetadata"`
}

MobileDevice represents a mobile device with the tado° app installed

func GetMobileDevices added in v0.3.0

func GetMobileDevices(client *Client, userHome *UserHome) ([]*MobileDevice, error)

GetMobileDevices lists all mobile devices linked to the given home

type MobileDeviceLocation added in v0.3.0

type MobileDeviceLocation struct {
	Stale                         bool                                `json:"stale"`
	AtHome                        bool                                `json:"atHome"`
	BearingFromHome               MobileDeviceLocationBearingFromHome `json:"bearingFromHome"`
	RelativeDistanceFromHomeFence float64                             `json:"relativeDistanceFromHomeFence"`
}

MobileDeviceLocation holds information regarding the current location of mobile device

type MobileDeviceLocationBearingFromHome added in v0.3.0

type MobileDeviceLocationBearingFromHome struct {
	Degrees float64 `json:"degrees"`
	Radians float64 `json:"radians"`
}

MobileDeviceLocationBearingFromHome holds the current bearing of a mobile device from the home

type MobileDeviceMetadata added in v0.3.0

type MobileDeviceMetadata struct {
	Platform  string `json:"platform"`
	OSVersion string `json:"osVersion"`
	Model     string `json:"model"`
	Locale    string `json:"locale"`
}

MobileDeviceMetadata holds some general metadata about a mobile device

type MobileDeviceSettings added in v0.3.0

type MobileDeviceSettings struct {
	GeoTrackingEnabled bool                                   `json:"geoTrackingEnabled"`
	PushNotifications  *MobileDeviceSettingsPushNotifications `json:"pushNotifications,omitempty"`
}

MobileDeviceSettings holds the settings of a mobile device

type MobileDeviceSettingsPushNotifications added in v0.3.0

type MobileDeviceSettingsPushNotifications struct {
	LowBatteryReminder          bool `json:"lowBatteryReminder"`
	AwayModeReminder            bool `json:"awayModeReminder"`
	HomeModeReminder            bool `json:"homeModeReminder"`
	OpenWindowReminder          bool `json:"openWindowReminder"`
	EnergySavingsReportReminder bool `json:"energySavingsReportReminder"`
	IncidentDetection           bool `json:"incidentDetection"`
}

MobileDeviceSettingsPushNotifications holds the push notification settings

type PresenceLock added in v0.3.0

type PresenceLock struct {
	HomePresence string `json:"homePresence"`
}

PresenceLock holds a locked presence setting for a home

type ScheduleBlock added in v0.2.0

type ScheduleBlock struct {
	DayType             string               `json:"dayType"`
	Start               string               `json:"start"`
	End                 string               `json:"end"`
	GeolocationOverride bool                 `json:"geolocationOverride"`
	Setting             ScheduleBlockSetting `json:"setting"`
}

ScheduleBlock is a block in a tado° schedule

func GetSchedule added in v0.2.0

func GetSchedule(client *Client, userHome *UserHome, zone *Zone, timetable *ScheduleTimetable) ([]*ScheduleBlock, error)

GetSchedule returns the heating schedule of the given zone

type ScheduleBlockSetting added in v0.2.0

type ScheduleBlockSetting struct {
	Type        string                           `json:"type"`
	Power       string                           `json:"power"`
	Temperature *ScheduleBlockSettingTemperature `json:"temperature,omitempty"`
}

ScheduleBlockSetting holds the setting of a schedule block

type ScheduleBlockSettingTemperature added in v0.2.0

type ScheduleBlockSettingTemperature struct {
	Celsius    float64 `json:"celsius"`
	Fahrenheit float64 `json:"fahrenheit"`
}

ZoneOverlaySettingTemperature holds the temperature of a schedule block setting

type ScheduleTimetable added in v0.2.0

type ScheduleTimetable struct {
	ID   int32  `json:"id"`
	Type string `json:"type,omitempty"`
}

ScheduleTimetable is the type of a tado° schedule timetable

func GetActiveTimetable added in v0.2.0

func GetActiveTimetable(client *Client, userHome *UserHome, zone *Zone) (*ScheduleTimetable, error)

GetActiveTimetable returns the active schedule timetable for the given zone

func GetTimetables added in v0.2.0

func GetTimetables(client *Client, userHome *UserHome, zone *Zone) ([]*ScheduleTimetable, error)

GetTimetables lists available schedule timetables for the given zone

type User

type User struct {
	Name          string         `json:"name"`
	Email         string         `json:"email"`
	Username      string         `json:"username"`
	ID            string         `json:"id"`
	Homes         []UserHome     `json:"homes"`
	Locale        string         `json:"locale"`
	MobileDevices []MobileDevice `json:"mobileDevices"`
}

User represents a tado° user

func GetMe

func GetMe(client *Client) (*User, error)

GetMe returns information about the authenticated user.

func GetUsers added in v0.3.0

func GetUsers(client *Client, userHome *UserHome) ([]*User, error)

GetUsers lists all users and their mobile devices linked to the given home

type UserHome

type UserHome struct {
	ID   int32  `json:"id"`
	Name string `json:"name"`
}

UserHome represents a home in a user object

type Weather added in v0.3.0

type Weather struct {
	SolarIntensity     *WeatherSolarIntensity     `json:"solarIntensity"`
	OutsideTemperature *WeatherOutsideTemperature `json:"outsideTemperature"`
	WeatherState       *WeatherState              `json:"weatherState"`
}

Weather holds weather information from the home's location

func GetWeather added in v0.3.0

func GetWeather(client *Client, userHome *UserHome) (*Weather, error)

GetWeather returns weather information at the given homes location

type WeatherOutsideTemperature added in v0.3.0

type WeatherOutsideTemperature struct {
	Celsius    float64                            `json:"celsius"`
	Fahrenheit float64                            `json:"fahrenheit"`
	Timestamp  string                             `json:"timestamp"`
	Type       string                             `json:"type"`
	Precision  WeatherOutsideTemperaturePrecision `json:"precision"`
}

WeatherOutsideTemperature holds the temperature outside of the home

type WeatherOutsideTemperaturePrecision added in v0.3.0

type WeatherOutsideTemperaturePrecision struct {
	Celsius    float64 `json:"celsius"`
	Fahrenheit float64 `json:"fahrenheit"`
}

WeatherOutsideTemperaturePrecision holds the precision of the home's outside temperature

type WeatherSolarIntensity added in v0.3.0

type WeatherSolarIntensity struct {
	Type       string  `json:"type"`
	Percentage float64 `json:"percentage"`
	Timestamp  string  `json:"timestamp"`
}

WeatherSolarIntensity holds the solar intensity at the home's location as a percentage

type WeatherState added in v0.3.0

type WeatherState struct {
	Type      string `json:"type"`
	Value     string `json:"value"`
	Timestamp string `json:"timestamp"`
}

WeatherState stores the state of the weather, e.g. rain, sunny, foggy...

type Zone

type Zone struct {
	ID          int32    `json:"id"`
	Name        string   `json:"name"`
	Type        string   `json:"type"`
	DateCreated string   `json:"dateCreated"`
	DeviceTypes []string `json:"deviceTypes"`
	// TODO devices missing
	ReportAvailable     bool                    `json:"reportAvailable"`
	SupportsDazzle      bool                    `json:"supportsDazzle"`
	DazzleEnabled       bool                    `json:"dazzleEnabled"`
	DazzleMode          ZoneDazzleMode          `json:"dazzleMode"`
	OpenWindowDetection ZoneOpenWindowDetection `json:"openWindowDetection"`
}

Zone represents a tado° zone

func GetZones

func GetZones(client *Client, userHome *UserHome) ([]*Zone, error)

GetZones returns information about the zones in the given home

type ZoneCapabilities added in v0.3.0

type ZoneCapabilities struct {
	Type              string                        `json:"type"`
	CanSetTemperature *bool                         `json:"canSetTemperature,omitempty"`
	Temperatures      *ZoneCapabilitiesTemperatures `json:"temperatures,omitempty"`
}

ZoneCapabilitiesstores the capabilities of a zone, such as the supported min/max temperatures

func GetZoneCapabilities added in v0.3.0

func GetZoneCapabilities(client *Client, userHome *UserHome, zone *Zone) (*ZoneCapabilities, error)

GetZoneCapabilities returns the capabilities of the given zone

type ZoneCapabilitiesTemperatureValues added in v0.3.0

type ZoneCapabilitiesTemperatureValues struct {
	Min  int32   `json:"min"`
	Max  int32   `json:"max"`
	Step float32 `json:"step"`
}

ZoneCapabilitiesTemperatureValues holds the numeric values of temperature related capabilities of a zone

type ZoneCapabilitiesTemperatures added in v0.3.0

type ZoneCapabilitiesTemperatures struct {
	Celsius    *ZoneCapabilitiesTemperatureValues `json:"celsius,omitempty"`
	Fahrenheit *ZoneCapabilitiesTemperatureValues `json:"fahrenheit,omitempty"`
}

ZoneCapabilitiesTemperatures holds the temperature related capabilities of a zone

type ZoneDazzleMode

type ZoneDazzleMode struct {
	Supported bool `json:"supported"`
	Enabled   bool `json:"enabled"`
}

ZoneDazzleMode holds information about dazzle mode in a zone

type ZoneOpenWindowDetection

type ZoneOpenWindowDetection struct {
	Supported        bool  `json:"supported"`
	Enabled          bool  `json:"enabled"`
	TimeoutInSeconds int32 `json:"timeoutInSeconds"`
}

ZoneOpenWindowDetection holds information about open window detection in a zone

type ZoneOverlay added in v0.2.0

type ZoneOverlay struct {
	Type        string                  `json:"type,omitempty"`
	Setting     ZoneOverlaySetting      `json:"setting"`
	Termination *ZoneOverlayTermination `json:"termination,omitempty"`
}

ZoneOverlay holds overlay information of a zone

func SetZoneOverlayHeatingOn added in v0.2.0

func SetZoneOverlayHeatingOn(client *Client, userHome *UserHome, zone *Zone, temperature float64) (*ZoneOverlay, error)

SetZoneOverlayHeatingOn turns on heating in a zone. The temperature should use the unit configured for the home. Returns the resulting overlay if successful.

type ZoneOverlaySetting added in v0.2.0

type ZoneOverlaySetting struct {
	Type        string                         `json:"type"`
	Power       string                         `json:"power"`
	Temperature *ZoneOverlaySettingTemperature `json:"temperature,omitempty"`
}

ZoneOverlaySetting holds the setting of a zone overlay

type ZoneOverlaySettingTemperature added in v0.2.0

type ZoneOverlaySettingTemperature struct {
	Celsius    float64 `json:"celsius"`
	Fahrenheit float64 `json:"fahrenheit"`
}

ZoneOverlaySettingTemperature holds the temperature of a zone state setting

type ZoneOverlayTermination added in v0.2.0

type ZoneOverlayTermination struct {
	Type                   string  `json:"type"`
	TypeSkillBasedApp      string  `json:"typeSkillBasedApp"`
	DurationInSeconds      int32   `json:"durationInSeconds,omitempty"`
	Expiry                 string  `json:"expiry,omitempty"`
	RemainingTimeInSeconds int32   `json:"remainingTimeInSeconds,omitempty"`
	ProjectedExpiry        *string `json:"projectedExpiry"`
}

ZoneOverlayTermination holdes the termination information of a zone overlay

type ZoneState

type ZoneState struct {
	TadoMode            string `json:"tadoMode"`
	GeolocationOverride bool   `json:"geolocationOverride"`
	// TODO missing geolocationOverrideDisableTime
	// TODO missing preparation
	Setting     ZoneStateSetting     `json:"setting"`
	OverlayType *string              `json:"overlayType"`
	Overlay     *ZoneOverlay         `json:"overlay"`
	OpenWindow  *ZoneStateOpenWindow `json:"openWindow"`
	// TODO missing nextScheduleChange
	// TODO missing nextTimeBlock
	Link ZoneStateLink `json:"link"`
	// TODO missing activityDataPoints
	SensorDataPoints *ZoneStateSensorDataPoints `json:"sensorDataPoints"`
}

ZoneState represents the state of a tado° zone

func GetZoneState

func GetZoneState(client *Client, userHome *UserHome, zone *Zone) (*ZoneState, error)

GetZoneState returns the state of the given zone

type ZoneStateActivityDataPoints

type ZoneStateActivityDataPoints struct {
	HeatingPower *ZoneStateActivityDataPointsHeatingPower `json:"heatingPower"`
}

ZoneStateActivityDataPoints holds activity data points for a zone

type ZoneStateActivityDataPointsHeatingPower

type ZoneStateActivityDataPointsHeatingPower struct {
	Type       string  `json:"type"`
	Percentage float64 `json:"percentage"`
	Timestamp  string  `json:"timestamp"`
}

ZoneStateActivityDataPointsHeatingPower holds information about the heating power in a zone

type ZoneStateLink struct {
	State string `json:"state"`
}

ZoneStateLink holds the link information of a tado zone

type ZoneStateOpenWindow

type ZoneStateOpenWindow struct {
	DetectedTime           string `json:"detectedTime"`
	DurationInSeconds      int32  `json:"durationInSeconds"`
	Expiry                 string `json:"expiry"`
	RemainingTimeInSeconds int32  `json:"remainingTimeInSeconds"`
}

ZoneStateOpenWindow holds the information about an open window of a zone state

type ZoneStateSensorDataPoints

type ZoneStateSensorDataPoints struct {
	InsideTemperature *ZoneStateSensorDataPointsInsideTemperature `json:"insideTemperature"`
	Humidity          *ZoneStateSensorDataPointsHumidity          `json:"humidity"`
}

ZoneStateSensorDataPoints holds sensor data points for a zone

type ZoneStateSensorDataPointsHumidity

type ZoneStateSensorDataPointsHumidity struct {
	Type       string  `json:"type"`
	Percentage float64 `json:"percentage"`
	Timestamp  string  `json:"timestamp"`
}

ZoneStateSensorDataPointsHumidity holds humidity information of a zone

type ZoneStateSensorDataPointsInsideTemperature

type ZoneStateSensorDataPointsInsideTemperature struct {
	Celsius    float64                                             `json:"celsius"`
	Fahrenheit float64                                             `json:"fahrenheit"`
	Timestamp  string                                              `json:"timestamp"`
	Type       string                                              `json:"type"`
	Precision  ZoneStateSensorDataPointsInsideTemperaturePrecision `json:"precision"`
}

ZoneStateSensorDataPointsInsideTemperature holds information about the inside temperature of a zone

type ZoneStateSensorDataPointsInsideTemperaturePrecision

type ZoneStateSensorDataPointsInsideTemperaturePrecision struct {
	Celsius    float64 `json:"celsius"`
	Fahrenheit float64 `json:"fahrenheit"`
}

ZoneStateSensorDataPointsInsideTemperaturePrecision holds the precision of inside temperature of a zone

type ZoneStateSetting

type ZoneStateSetting struct {
	Type        string                      `json:"type"`
	Power       string                      `json:"power"`
	Temperature ZoneStateSettingTemperature `json:"temperature"`
}

ZoneStateSetting holds the setting of a zone

type ZoneStateSettingTemperature

type ZoneStateSettingTemperature struct {
	Celsius    float64 `json:"celsius"`
	Fahrenheit float64 `json:"fahrenheit"`
}

ZoneStateSettingTemperature holds the temperature of a zone state setting

Directories

Path Synopsis
examples
me
internal
oauth2
Package oauth2 is a generated GoMock package.
Package oauth2 is a generated GoMock package.

Jump to

Keyboard shortcuts

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