Documentation ¶
Index ¶
- Constants
- type AwayConfiguration
- type ComfortLevel
- type DayType
- type DazzleMode
- type Device
- type DeviceCharacteristics
- type DeviceConnectionState
- type DeviceMountingState
- type DeviceType
- type EarlyStart
- type HTTPClient
- type HeatingSchedule
- type Home
- func (h *Home) GetDevices(ctx context.Context) ([]*Device, error)
- func (h *Home) GetInstallations(ctx context.Context) ([]*Installation, error)
- func (h *Home) GetMobileDevices(ctx context.Context) ([]*MobileDevice, error)
- func (h *Home) GetState(ctx context.Context) (*HomeState, error)
- func (h *Home) GetUsers(ctx context.Context) ([]*User, error)
- func (h *Home) GetWeather(ctx context.Context) (*Weather, error)
- func (h *Home) GetZone(ctx context.Context, name string) (*Zone, error)
- func (h *Home) GetZones(ctx context.Context) ([]*Zone, error)
- func (h *Home) SetPresenceAuto(ctx context.Context) error
- func (h *Home) SetPresenceAway(ctx context.Context) error
- func (h *Home) SetPresenceHome(ctx context.Context) error
- type HomeAddress
- type HomeContactDetails
- type HomeGeolocation
- type HomeIncidentDetection
- type HomeState
- type Installation
- type LinkState
- type Measurement
- type MeasurementType
- type MobileDevice
- type MobileDeviceLocation
- type MobileDeviceLocationBearingFromHome
- type MobileDeviceMetadata
- type MobileDeviceSettings
- type MobileDeviceSettingsPushNotifications
- type OpenWindowDetection
- type OverlayType
- type PercentageMeasurement
- type Power
- type Presence
- type PresenceLock
- type ScheduleDays
- type ScheduleTimeBlock
- type ScheduleTimetable
- type Tado
- type TemperatureMeasurement
- type TemperatureMeasurementPrecision
- type TemperatureOffset
- type TemperatureUnit
- type TimetableType
- type User
- type UserHome
- type Weather
- type WeatherMeasurement
- type Zone
- func (z *Zone) CloseWindow(ctx context.Context) error
- func (z *Zone) DisableDazzleMode(ctx context.Context) error
- func (z *Zone) DisableOpenWindowDetection(ctx context.Context) error
- func (z *Zone) EnableDazzleMode(ctx context.Context) error
- func (z *Zone) EnableOpenWindowDetection(ctx context.Context, timeout int32) error
- func (z *Zone) GetActiveScheduleTimetable(ctx context.Context) (*ScheduleTimetable, error)
- func (z *Zone) GetAwayConfiguration(ctx context.Context) (*AwayConfiguration, error)
- func (z *Zone) GetCapabilities(ctx context.Context) (*ZoneCapabilities, error)
- func (z *Zone) GetDazzleMode(ctx context.Context) (*ZoneDazzleMode, error)
- func (z *Zone) GetDevices(ctx context.Context) ([]*Device, error)
- func (z *Zone) GetEarlyStart(ctx context.Context) (bool, error)
- func (z *Zone) GetHeatingSchedule(ctx context.Context) (*HeatingSchedule, error)
- func (z *Zone) GetManualControlTerminationCondition(ctx context.Context) (*ZoneOverlayTermination, error)
- func (z *Zone) GetOpenWindowDetection(ctx context.Context) (*OpenWindowDetection, error)
- func (z *Zone) GetState(ctx context.Context) (*ZoneState, error)
- func (z *Zone) ManualControlTimer(ctx context.Context, duration int32) error
- func (z *Zone) ManualControlUntilAutoChange(ctx context.Context) error
- func (z *Zone) ManualControlUntilUserEnd(ctx context.Context) error
- func (z *Zone) OpenWindow(ctx context.Context) error
- func (z *Zone) ResumeSchedule(ctx context.Context) error
- func (z *Zone) ScheduleAllDays(ctx context.Context) (*HeatingSchedule, error)
- func (z *Zone) ScheduleMonToFriSatSun(ctx context.Context) (*HeatingSchedule, error)
- func (z *Zone) ScheduleMonToSun(ctx context.Context) (*HeatingSchedule, error)
- func (z *Zone) SetActiveScheduleTimetable(ctx context.Context, timetable *ScheduleTimetable) error
- func (z *Zone) SetAwayConfiguration(ctx context.Context, awayConfig *AwayConfiguration) error
- func (z *Zone) SetAwayMinimumTemperature(ctx context.Context, temperature float64) error
- func (z *Zone) SetAwayPreheatComfortLevel(ctx context.Context, comfortLevel ComfortLevel) error
- func (z *Zone) SetAwayPreheatOff(ctx context.Context) error
- func (z *Zone) SetEarlyStart(ctx context.Context, earlyStart bool) error
- func (z *Zone) SetHeatingOff(ctx context.Context) error
- func (z *Zone) SetHeatingOn(ctx context.Context, temperature float64) error
- func (z *Zone) SetHeatingSchedule(ctx context.Context, schedule *HeatingSchedule) error
- func (z *Zone) SetManualControlTerminationCondition(ctx context.Context, condition *ZoneOverlayTermination) error
- type ZoneCapabilities
- type ZoneCapabilitiesTemperatureValues
- type ZoneCapabilitiesTemperatures
- type ZoneDazzleMode
- type ZoneDefaultOverlay
- type ZoneOpenWindowDetection
- type ZoneOverlay
- type ZoneOverlayTermination
- type ZoneSetting
- type ZoneSettingTemperature
- type ZoneState
- type ZoneStateActivityDataPoints
- type ZoneStateLink
- type ZoneStateLinkReason
- type ZoneStateNextScheduledChange
- type ZoneStateNextTimeBlock
- type ZoneStateOpenWindow
- type ZoneStateSensorDataPoints
- type ZoneType
Constants ¶
const ( ZoneTypeHeating = "HEATING" ZoneTypeHotWater = "HOT_WATER" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AwayConfiguration ¶
type AwayConfiguration struct { Type ZoneType `json:"type"` AutoAdjust bool `json:"autoAdjust"` ComfortLevel ComfortLevel `json:"comfortLevel"` Setting *ZoneSetting `json:"setting"` }
AwayConfiguration holds the settings to use when everybody leaves the house
type ComfortLevel ¶
type ComfortLevel int32
ComfortLevel defines how a zone is preheated before arrival
const ( // ComfortLevelEco will not preheat the zone too early before arrival and only reach the target temperature after arrival ComfortLevelEco ComfortLevel = 0 // ComfortLevelBalance will find the best trade-off between comfort and savings ComfortLevelBalance ComfortLevel = 50 // ComfortLevelComfort ensures that the desired home temperature is reached shortly before arrival ComfortLevelComfort ComfortLevel = 100 )
type DayType ¶
type DayType string
DayType specifies the type of day for a heating schedule block
const ( DayTypeMondayToSunday DayType = "MONDAY_TO_SUNDAY" DayTypeMondayToFriday DayType = "MONDAY_TO_FRIDAY" DayTypeMonday DayType = "MONDAY" DayTypeTuesday DayType = "TUESDAY" DayTypeWednesday DayType = "WEDNESDAY" DayTypeThursday DayType = "THURSDAY" DayTypeFriday DayType = "FRIDAY" DayTypeSaturday DayType = "SATURDAY" DayTypeSunday DayType = "SUNDAY" )
type DazzleMode ¶ added in v2.1.0
type DazzleMode struct {
Enabled bool `json:"enabled"`
}
DazzleMode controls whether dazzle mode is enabled or not.
type Device ¶
type Device struct { DeviceType DeviceType `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"` Duties []string `json:"duties,omitempty"` // contains filtered or unexported fields }
Device represents a tado° device such as a thermostat or a bridge
func (*Device) GetTemperatureOffset ¶
GetTemperatureOffset returns the temperature offsets of the device
type DeviceCharacteristics ¶
type DeviceCharacteristics struct {
Capabilities []string `json:"capabilities"`
}
DeviceCharacteristics lists the capabilities of a device
type DeviceConnectionState ¶
type DeviceConnectionState struct { Value bool `json:"value"` Timestamp time.Time `json:"timestamp"` }
DeviceConnectionState specifies if the device is connected or not
type DeviceMountingState ¶
type DeviceMountingState struct { Value string `json:"value"` Timestamp time.Time `json:"timestamp"` }
DeviceMountingState holds the mounting state of a device, e.g. if it is calibrated
type DeviceType ¶
type DeviceType string
DeviceType defines the type of a device
const ( DeviceTypeInternetBridge DeviceType = "IB01" DeviceTypeExtensionKit01 DeviceType = "BU01" DeviceTypeExtensionKit02 DeviceType = "BU02" DeviceTypeSmartACControl01 DeviceType = "WR01" DeviceTypeSmartACControl02 DeviceType = "WR02" DeviceTypeSmartThermostat01 DeviceType = "RU01" DeviceTypeSmartThermostat02 DeviceType = "RU02" DeviceTypeSmartRadiatorThermostat01 DeviceType = "VA01" DeviceTypeSmartRadiatorThermostat02 DeviceType = "VA02" DeviceTypeWirelessTemperatureSensor01 DeviceType = "SU02" DeviceTypeWirelessReceiverProgrammer01 DeviceType = "BP02" DeviceTypeWirelessReceiverBoiler01 DeviceType = "BR02" )
type EarlyStart ¶
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 HeatingSchedule ¶
type HeatingSchedule struct { ScheduleDays ScheduleDays Timetable *ScheduleTimetable Blocks []*ScheduleTimeBlock // contains filtered or unexported fields }
func (*HeatingSchedule) AddTimeBlock ¶
func (s *HeatingSchedule) AddTimeBlock(_ context.Context, dayType DayType, start, end string, geolocationOverride bool, power Power, temperature float64) *HeatingSchedule
AddTimeBlock adds a time block to the heating schedule. Start and end parameters define when the time blocks starts and ends and are in the format HH:MM. GeolocationOverride specifies if the timeblock will override geofencing control. Power defines if heating is powered on or off and temperature specifies the temperature to heat to. Temperature is interpreted in Celsius / Fahrenheit depending on the temperature unit configured in the home.
func (*HeatingSchedule) NewTimeBlock ¶
func (s *HeatingSchedule) NewTimeBlock(ctx context.Context, dayType DayType, start, end string, geolocationOverride bool, power Power, temperature float64) *HeatingSchedule
NewTimeBlock resets the list of time blocks in the heating schedule and adds the given time block as the first new block.
type Home ¶
type Home struct { ID int32 `json:"id"` Name string `json:"name"` DateTimeZone string `json:"dateTimeZone"` DateCreated time.Time `json:"dateCreated"` TemperatureUnit TemperatureUnit `json:"temperatureUnit"` 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"` // contains filtered or unexported fields }
Home represents a home equipped with tado°
func (*Home) GetDevices ¶
GetDevices lists all devices in the home
func (*Home) GetInstallations ¶
func (h *Home) GetInstallations(ctx context.Context) ([]*Installation, error)
GetInstallations lists all installations in the home
func (*Home) GetMobileDevices ¶
func (h *Home) GetMobileDevices(ctx context.Context) ([]*MobileDevice, error)
GetMobileDevices lists all mobile devices linked to the home
func (*Home) GetWeather ¶
GetWeather returns weather information at the homes location
func (*Home) SetPresenceAuto ¶
SetPresenceAuto enables geofencing auto mode.
func (*Home) SetPresenceAway ¶
SetPresenceAway sets the geofencing presence to 'away'.
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 ¶
type HomeState struct { Presence Presence `json:"presence"` PresenceLocked bool `json:"presenceLocked"` }
HomeState represents the state of a tado° home
type Installation ¶
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
type Measurement ¶
type Measurement struct { Type MeasurementType `json:"type"` Timestamp time.Time `json:"timestamp"` }
Measurement measures a value at a certain point in time. See MeasurementType for available types of measurements.
type MeasurementType ¶
type MeasurementType string
MeasurementType specifies teh type of a measurement
const ( MeasurementTypeTemperature MeasurementType = "TEMPERATURE" MeasurementTypePercentage MeasurementType = "PERCENTAGE" MeasurementTypeWeather MeasurementType = "WEATHER_STATE" )
type MobileDevice ¶
type MobileDevice struct { Name string `json:"name"` ID int32 `json:"id"` Settings MobileDeviceSettings `json:"settings"` Location *MobileDeviceLocation `json:"location"` DeviceMetadata MobileDeviceMetadata `json:"deviceMetadata"` // contains filtered or unexported fields }
MobileDevice represents a mobile device with the tado° app installed
func (*MobileDevice) Delete ¶
func (md *MobileDevice) Delete(ctx context.Context) error
Delete deletes the mobile device
func (*MobileDevice) SetSettings ¶
func (md *MobileDevice) SetSettings(ctx context.Context, settings MobileDeviceSettings) error
SetSettings updates the mobile device with the given settings
type MobileDeviceLocation ¶
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 ¶
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 ¶
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 ¶
type MobileDeviceSettings struct { GeoTrackingEnabled bool `json:"geoTrackingEnabled"` PushNotifications *MobileDeviceSettingsPushNotifications `json:"pushNotifications,omitempty"` }
MobileDeviceSettings holds the settings of a mobile device
type MobileDeviceSettingsPushNotifications ¶
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 OpenWindowDetection ¶ added in v2.1.0
type OpenWindowDetection struct { Enabled bool `json:"enabled"` TimeoutInSeconds int32 `json:"timeoutInSeconds,omitempty"` }
OpenWindowDetection controls whether open window detection is enabled or not, and how long to shut off the heating after a window has been opened.
type OverlayType ¶
type OverlayType string
OverlayType specifies the type of an overlay
const ( // OverlayTypeManual remains active until ended by user OverlayTypeManual OverlayType = "MANUAL" // OverlayTypeAuto remains active until next automatic change OverlayTypeAuto OverlayType = "TADO_MODE" // OverlayTypeTimer remains active for a given duration OverlayTypeTimer OverlayType = "TIMER" )
type PercentageMeasurement ¶
type PercentageMeasurement struct { Measurement Percentage float64 `json:"percentage"` }
PercentageMeasurement holds a measured percentage
type PresenceLock ¶
type PresenceLock struct {
HomePresence Presence `json:"homePresence"`
}
PresenceLock holds a locked presence setting for a home
type ScheduleDays ¶
type ScheduleDays string
const ( ScheduleDaysMonToSun ScheduleDays = ScheduleDays(TimetableOneDay) ScheduleDaysMonToFriSatSun ScheduleDays = ScheduleDays(TimetableThreeDay) ScheduleDaysMonTueWedThuFriSatSun ScheduleDays = ScheduleDays(TimetableSevenDay) )
type ScheduleTimeBlock ¶
type ScheduleTimeBlock struct { DayType DayType `json:"dayType"` Start string `json:"start"` End string `json:"end"` GeolocationOverride bool `json:"geolocationOverride"` Setting *ZoneSetting `json:"setting"` }
ScheduleTimeBlock is a block in a tado° schedule
type ScheduleTimetable ¶
type ScheduleTimetable struct { ID int32 `json:"id"` Type TimetableType `json:"type,omitempty"` // contains filtered or unexported fields }
ScheduleTimetable is the type of a tado° schedule timetable
func (*ScheduleTimetable) GetTimeBlocks ¶
func (s *ScheduleTimetable) GetTimeBlocks(ctx context.Context) ([]*ScheduleTimeBlock, error)
GetTimeBlocks returns all time blocks of the schedule.
func (*ScheduleTimetable) SetTimeBlocks ¶
func (s *ScheduleTimetable) SetTimeBlocks(ctx context.Context, blocks []*ScheduleTimeBlock) error
SetTimeBlocks updates the schedule with the given time blocks.
type TemperatureMeasurement ¶
type TemperatureMeasurement struct { Measurement Celsius float64 `json:"celsius"` Fahrenheit float64 `json:"fahrenheit"` Precision TemperatureMeasurementPrecision `json:"precision"` }
TemperatureMeasurement holds a measured temperature
type TemperatureMeasurementPrecision ¶
type TemperatureMeasurementPrecision struct { Celsius float64 `json:"celsius"` Fahrenheit float64 `json:"fahrenheit"` }
TemperatureMeasurementPrecision holds the precision of a temperature measurement
type TemperatureOffset ¶
type TemperatureOffset struct { Celsius float32 `json:"celsius"` Fahrenheit float32 `json:"fahrenheit"` }
TemperatureOffset holds the current temperature offsets for a tado° device
type TemperatureUnit ¶
type TemperatureUnit string
TemperatureUnit defines the unit in which a temperature is measured
const ( TemperatureUnitCelsius TemperatureUnit = "CELSIUS" TemperatureUnitFahrenheit TemperatureUnit = "FAHRENHEIT" )
type TimetableType ¶
type TimetableType string
TimetableType specifies the type of a timetable
const ( // TimetableOneDay is a timetable type with a single schedule for all days TimetableOneDay TimetableType = "ONE_DAY" // TimetableThreeDay is a timetable type with a schedule for week days, saturdays and sundays TimetableThreeDay TimetableType = "THREE_DAY" // TimetableSevenDay is a timetable type with one schedule for each day TimetableSevenDay TimetableType = "SEVEN_DAY" )
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"` // contains filtered or unexported fields }
User represents a tado° user
type Weather ¶
type Weather struct { SolarIntensity *PercentageMeasurement `json:"solarIntensity"` OutsideTemperature *TemperatureMeasurement `json:"outsideTemperature"` WeatherState *WeatherMeasurement `json:"weatherState"` }
Weather holds weather information from the home's location
type WeatherMeasurement ¶
type WeatherMeasurement struct { Measurement Value string `json:"value"` }
WeatherMeasurement holds a measurement of the weather state
type Zone ¶
type Zone struct { ID int32 `json:"id"` Name string `json:"name"` Type ZoneType `json:"type"` DateCreated time.Time `json:"dateCreated"` DeviceTypes []DeviceType `json:"deviceTypes"` Devices []Device `json:"devices"` ReportAvailable bool `json:"reportAvailable"` SupportsDazzle bool `json:"supportsDazzle"` DazzleEnabled bool `json:"dazzleEnabled"` DazzleMode ZoneDazzleMode `json:"dazzleMode"` OpenWindowDetection ZoneOpenWindowDetection `json:"openWindowDetection"` // contains filtered or unexported fields }
Zone represents a tado° zone
func (*Zone) CloseWindow ¶
CloseWindow ends open window mode in the zone.
func (*Zone) DisableDazzleMode ¶ added in v2.1.0
DisableDazzleMode disables dazzle mode in the zone.
func (*Zone) DisableOpenWindowDetection ¶ added in v2.1.0
DisableOpenWindowDetection disable open window detection.
func (*Zone) EnableDazzleMode ¶ added in v2.1.0
EnableDazzleMode enables dazzle mode in the zone.
func (*Zone) EnableOpenWindowDetection ¶ added in v2.1.0
EnableOpenWindowDetection enable open window detection with the given heating timeout duration in seconds after an open window has been detected.
func (*Zone) GetActiveScheduleTimetable ¶
func (z *Zone) GetActiveScheduleTimetable(ctx context.Context) (*ScheduleTimetable, error)
GetActiveScheduleTimetable returns the active schedule timetable for the zone.
func (*Zone) GetAwayConfiguration ¶
func (z *Zone) GetAwayConfiguration(ctx context.Context) (*AwayConfiguration, error)
GetAwayConfiguration returns the away configuration of the zone.
func (*Zone) GetCapabilities ¶
func (z *Zone) GetCapabilities(ctx context.Context) (*ZoneCapabilities, error)
GetCapabilities returns the capabilities of the zone.
func (*Zone) GetDazzleMode ¶ added in v2.1.0
func (z *Zone) GetDazzleMode(ctx context.Context) (*ZoneDazzleMode, error)
GetDazzleMode returns the current dazzle mode settings.
func (*Zone) GetDevices ¶
GetDevices lists all devices in the zone
func (*Zone) GetEarlyStart ¶
GetEarlyStart checks if early start is enabled in the zone.
func (*Zone) GetHeatingSchedule ¶
func (z *Zone) GetHeatingSchedule(ctx context.Context) (*HeatingSchedule, error)
GetHeatingSchedule gets the whole active schedule for the zone, including active timetable and time blocks.
func (*Zone) GetManualControlTerminationCondition ¶ added in v2.1.0
func (z *Zone) GetManualControlTerminationCondition(ctx context.Context) (*ZoneOverlayTermination, error)
GetManualControlTerminationCondition returns the condition how long manual control in the zone will remain active after a tado° device was controlled manually.
func (*Zone) GetOpenWindowDetection ¶ added in v2.1.0
func (z *Zone) GetOpenWindowDetection(ctx context.Context) (*OpenWindowDetection, error)
GetOpenWindowDetection returns the current open window detection settings.
func (*Zone) ManualControlTimer ¶ added in v2.1.0
ManualControlTimer ensures that manual control of the zone remains active for the given duration in seconds.
func (*Zone) ManualControlUntilAutoChange ¶ added in v2.1.0
ManualControlUntilAutoChange ensures that manual control of the zone remains active until the next automatic change in the tado° schedule.
func (*Zone) ManualControlUntilUserEnd ¶ added in v2.1.0
ManualControlUntilUserEnd ensures that manual control of the zone remains active until ended by the user.
func (*Zone) OpenWindow ¶
OpenWindow puts the zone into open window mode (open window must have been detected by tado° beforehand).
func (*Zone) ResumeSchedule ¶
ResumeSchedule resumes the zone's smart schedule.
func (*Zone) ScheduleAllDays ¶
func (z *Zone) ScheduleAllDays(ctx context.Context) (*HeatingSchedule, error)
ScheduleAllDays has a different schedule for each day of the week.
func (*Zone) ScheduleMonToFriSatSun ¶
func (z *Zone) ScheduleMonToFriSatSun(ctx context.Context) (*HeatingSchedule, error)
TimetableTMonToFriSatSun has the same schedule for all days between monday and friday and different schedules for saturday and sunday.
func (*Zone) ScheduleMonToSun ¶
func (z *Zone) ScheduleMonToSun(ctx context.Context) (*HeatingSchedule, error)
ScheduleMonToSun has the same schedule for all days between monday and sunday.
func (*Zone) SetActiveScheduleTimetable ¶
func (z *Zone) SetActiveScheduleTimetable(ctx context.Context, timetable *ScheduleTimetable) error
SetActiveScheduleTimetable sets the active schedule timetable for the zone. Should be one of TimetableMonToSun(), TimetableMonToFriSatSun() or TimetableAllDays(),
func (*Zone) SetAwayConfiguration ¶
func (z *Zone) SetAwayConfiguration(ctx context.Context, awayConfig *AwayConfiguration) error
SetAwayConfiguration updates the away configuration of the zone.
func (*Zone) SetAwayMinimumTemperature ¶
SetAwayMinimumTemperature sets the minimum temperature for away mode in the zone.
func (*Zone) SetAwayPreheatComfortLevel ¶
func (z *Zone) SetAwayPreheatComfortLevel(ctx context.Context, comfortLevel ComfortLevel) error
SetAwayPreheatComfortLevel sets the comfort level for preheating before arrival.
func (*Zone) SetAwayPreheatOff ¶
SetAwayPreheatOff turns off preheat before arrival. Tado° will only start heating after arrival. To turn preheating back on, use SetAwayPreheatComfortLevel().
func (*Zone) SetEarlyStart ¶
SetEarlyStart enables or disables early start in the zone.
func (*Zone) SetHeatingOff ¶
SetHeatingOff turns off the heating in the zone.
func (*Zone) SetHeatingOn ¶
SetHeatingOn turns on the heating in the zone. The temperature should use the unit configured for the home.
func (*Zone) SetHeatingSchedule ¶
func (z *Zone) SetHeatingSchedule(ctx context.Context, schedule *HeatingSchedule) error
SetHeatingSchedule sets the whole active schedule for the zone, including active timetable and time blocks.
func (*Zone) SetManualControlTerminationCondition ¶ added in v2.1.0
func (z *Zone) SetManualControlTerminationCondition(ctx context.Context, condition *ZoneOverlayTermination) error
SetManualControlTerminationCondition sets the given manual control termination condition. Possible types for the condition are "MANUAL" (Until ended by user), "TIMER" and "TADO_MODE" (Until next automatic change).
type ZoneCapabilities ¶
type ZoneCapabilities struct { Type ZoneType `json:"type"` CanSetTemperature *bool `json:"canSetTemperature,omitempty"` Temperatures *ZoneCapabilitiesTemperatures `json:"temperatures,omitempty"` }
ZoneCapabilities stores the capabilities of a zone, such as the supported min/max temperatures
type ZoneCapabilitiesTemperatureValues ¶
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 ¶
type ZoneCapabilitiesTemperatures struct { Celsius *ZoneCapabilitiesTemperatureValues `json:"celsius,omitempty"` Fahrenheit *ZoneCapabilitiesTemperatureValues `json:"fahrenheit,omitempty"` }
ZoneCapabilitiesTemperatures holds the temperature related capabilities of a zone
type ZoneDazzleMode ¶
ZoneDazzleMode holds information about dazzle mode in a zone
type ZoneDefaultOverlay ¶ added in v2.1.0
type ZoneDefaultOverlay struct {
TerminationCondition *ZoneOverlayTermination `json:"terminationCondition"`
}
ZoneDefaultOverlay holds the default overlay information of 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 ¶
type ZoneOverlay struct { Type OverlayType `json:"type,omitempty"` Setting *ZoneSetting `json:"setting"` Termination *ZoneOverlayTermination `json:"termination,omitempty"` }
ZoneOverlay holds overlay information of a zone
type ZoneOverlayTermination ¶
type ZoneOverlayTermination struct { Type OverlayType `json:"type"` TypeSkillBasedApp string `json:"typeSkillBasedApp,omitempty"` DurationInSeconds int32 `json:"durationInSeconds,omitempty"` Expiry string `json:"expiry,omitempty"` RemainingTimeInSeconds int32 `json:"remainingTimeInSeconds,omitempty"` ProjectedExpiry *string `json:"projectedExpiry,omitempty"` }
ZoneOverlayTermination holdes the termination information of a zone overlay
type ZoneSetting ¶
type ZoneSetting struct { Type ZoneType `json:"type"` Power Power `json:"power"` Temperature *ZoneSettingTemperature `json:"temperature"` }
ZoneSetting holds the setting of a zone
type ZoneSettingTemperature ¶
type ZoneSettingTemperature struct { Celsius float64 `json:"celsius"` Fahrenheit float64 `json:"fahrenheit"` }
ZoneSettingTemperature holds the temperature of a zone state setting
type ZoneState ¶
type ZoneState struct { TadoMode string `json:"tadoMode"` GeolocationOverride bool `json:"geolocationOverride"` GeolocationOverrideDisableTime *string `json:"geolocationOverrideDisableTime"` Setting ZoneSetting `json:"setting"` OverlayType *OverlayType `json:"overlayType"` Overlay *ZoneOverlay `json:"overlay"` OpenWindow *ZoneStateOpenWindow `json:"openWindow"` OpenWindowDetected bool `json:"openWindowDetected"` NextScheduledChange *ZoneStateNextScheduledChange `json:"nextScheduleChange"` NextTimeBlock *ZoneStateNextTimeBlock `json:"nextTimeBlock"` Link ZoneStateLink `json:"link"` ActivityDataPoints *ZoneStateActivityDataPoints `json:"activityDataPoints"` SensorDataPoints *ZoneStateSensorDataPoints `json:"sensorDataPoints"` }
ZoneState represents the state of a tado° zone
type ZoneStateActivityDataPoints ¶
type ZoneStateActivityDataPoints struct {
HeatingPower *PercentageMeasurement `json:"heatingPower"`
}
ZoneStateActivityDataPoints holds activity data points for a zone
type ZoneStateLink ¶
type ZoneStateLink struct { State string `json:"state"` Reason ZoneStateLinkReason `json:"reason,omitempty"` }
ZoneStateLink holds the link information of a tado zone
type ZoneStateLinkReason ¶
ZoneStateLinkReason holds the reason why a link is offline
type ZoneStateNextScheduledChange ¶
type ZoneStateNextScheduledChange struct { Start time.Time `json:"start"` Setting *ZoneSetting `json:"setting"` }
ZoneStateNextScheduledChange holds start time and settings of the next scheduled change
type ZoneStateNextTimeBlock ¶
ZoneStateNextTimeBlock holds the start time of the next time block
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 *TemperatureMeasurement `json:"insideTemperature"` Humidity *PercentageMeasurement `json:"humidity"` }
ZoneStateSensorDataPoints holds sensor data points for a zone