From 3ec42a66358c2f37ae9bc40cab47e3568875bfdf Mon Sep 17 00:00:00 2001 From: Christophe Lambin Date: Mon, 11 Nov 2024 00:29:13 +0100 Subject: [PATCH] feat: bump api spec to v2.2024.11.10.0 --- client.gen.go | 21 ++++++++++++--------- client.go | 5 ++--- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/client.gen.go b/client.gen.go index 0333d22..8932320 100644 --- a/client.gen.go +++ b/client.gen.go @@ -190,6 +190,12 @@ const ( HOTWATER ZoneType = "HOT_WATER" ) +// ActivityDataPoints Part of ZoneState. Empty for a HOT_WATER zone +type ActivityDataPoints struct { + // HeatingPower Used in Weather and ZoneState, to express quantities like heating power, humidity and solar intensity. + HeatingPower *PercentageDataPoint `json:"heatingPower,omitempty"` +} + // AirComfort result of /homes/{homeId}/airComfort type AirComfort struct { Comfort *[]struct { @@ -906,7 +912,7 @@ type PresenceLock struct { HomePresence *HomePresence `json:"homePresence,omitempty"` } -// SensorDataPoints empty for a HOT_WATER zone +// SensorDataPoints Element of ZoneState. Empty for a HOT_WATER zone type SensorDataPoints struct { // Humidity Used in Weather and ZoneState, to express quantities like heating power, humidity and solar intensity. Humidity *PercentageDataPoint `json:"humidity,omitempty"` @@ -1402,13 +1408,10 @@ type ZoneSetting struct { // ZoneState Result of /homes/{homeId}/zone/{zoneId}/state type ZoneState struct { - // ActivityDataPoints empty for a HOT_WATER zone - ActivityDataPoints *struct { - // HeatingPower Used in Weather and ZoneState, to express quantities like heating power, humidity and solar intensity. - HeatingPower *PercentageDataPoint `json:"heatingPower,omitempty"` - } `json:"activityDataPoints,omitempty"` - GeolocationOverride *bool `json:"geolocationOverride,omitempty"` - GeolocationOverrideDisableTime *interface{} `json:"geolocationOverrideDisableTime"` + // ActivityDataPoints Part of ZoneState. Empty for a HOT_WATER zone + ActivityDataPoints *ActivityDataPoints `json:"activityDataPoints,omitempty"` + GeolocationOverride *bool `json:"geolocationOverride,omitempty"` + GeolocationOverrideDisableTime *interface{} `json:"geolocationOverrideDisableTime"` Link *struct { // State known values: // * ONLINE @@ -1437,7 +1440,7 @@ type ZoneState struct { Preparation *interface{} `json:"preparation"` RunningOfflineSchedule *bool `json:"runningOfflineSchedule,omitempty"` - // SensorDataPoints empty for a HOT_WATER zone + // SensorDataPoints Element of ZoneState. Empty for a HOT_WATER zone SensorDataPoints *SensorDataPoints `json:"sensorDataPoints,omitempty"` // Setting (temperature) settings for a zone which is used in scheduled TimeTableBlocks, in ZoneOverlays (manual override for the scheduled setting), and in AwayConfiguration (settings to be used when the home is in AWAY mode). diff --git a/client.go b/client.go index 1255594..a48b1a8 100644 --- a/client.go +++ b/client.go @@ -6,11 +6,10 @@ import ( "net/http" ) -////go:generate oapi-codegen -config config.yaml https://raw.githubusercontent.com/kritsel/tado-openapispec-v2/refs/tags/v2.2024.09.22.0/tado-openapispec-v2.yaml - ////go:generate oapi-codegen -config config.yaml ../tado-openapispec-v2/tado-openapispec-v2.yaml +////go:generate oapi-codegen -config config.yaml https://raw.githubusercontent.com/clambin/tado-openapispec-v2/refs/heads/combined/tado-openapispec-v2.yaml +//go:generate oapi-codegen -config config.yaml https://raw.githubusercontent.com/kritsel/tado-openapispec-v2/refs/tags/v2.2024.11.10.0/tado-openapispec-v2.yaml -//go:generate oapi-codegen -config config.yaml https://raw.githubusercontent.com/clambin/tado-openapispec-v2/refs/heads/combined/tado-openapispec-v2.yaml const ServerURL = "https://my.tado.com/api/v2" func NewOAuth2Client(ctx context.Context, username string, password string) (*http.Client, error) {