Skip to content

Commit f7893a5

Browse files
committed
release v2.2025.02.02.0
1 parent f5d9a5f commit f7893a5

File tree

3 files changed

+85
-2
lines changed

3 files changed

+85
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
package tadoclient.apis
2+
3+
import org.junit.jupiter.api.*
4+
import org.springframework.beans.factory.annotation.Autowired
5+
import org.springframework.beans.factory.annotation.Qualifier
6+
import org.junit.jupiter.api.condition.EnabledIf
7+
import org.springframework.boot.test.context.SpringBootTest
8+
import org.springframework.web.client.RestClient
9+
import tadoclient.Application
10+
import tadoclient.TadoConfig
11+
import tadoclient.verify.assertCorrectResponse
12+
import tadoclient.verify.verifyHeatingCircuit
13+
import tadoclient.verify.verifyZoneControl
14+
import kotlin.test.assertNotEquals
15+
16+
@SpringBootTest(classes = arrayOf( Application::class))
17+
@TestMethodOrder(MethodOrderer.OrderAnnotation::class)
18+
@DisplayName("tado API - heating circuit")
19+
class HeatingCircuitAPI_IT(
20+
@Qualifier("tadoStrictRestClient")
21+
val tadoStrictRestClient: RestClient,
22+
23+
@Autowired
24+
tadoConfig: TadoConfig
25+
): BaseTest(tadoConfig) {
26+
val tadoStrictHeatingCircuitApiAPI = HeatingCircuitApi(tadoStrictRestClient)
27+
28+
@Test
29+
@DisplayName("GET /homes/{homeId}/heatingCircuits")
30+
@Order(10)
31+
@EnabledIf(value = "isHomeConfigured", disabledReason = "no home specified in tado set-up")
32+
fun getHeatingCircuits() {
33+
val endpoint = "GET /homes/{homeId}/heatingCircuits"
34+
val heatingCircuits = assertCorrectResponse { tadoStrictHeatingCircuitApiAPI.getHeatingCircuits(tadoConfig.home!!.id) }
35+
assertNotEquals(0, heatingCircuits.size)
36+
heatingCircuits.forEachIndexed {i, elem -> verifyHeatingCircuit(elem, "$endpoint[$i]") }
37+
}
38+
39+
// Integration test for GET /homes/{homeId}/zones/{zoneId}/control
40+
// see DeviceApi_IT
41+
// (the operation belongs to multiple API operation groups, and the 'device' group is considered to be the primary one)
42+
43+
@Test
44+
@DisplayName("GET /homes/{homeId}/zones/{zoneId}/control/heatingCircuit")
45+
@Order(20)
46+
@EnabledIf(value = "isHeatingZoneConfigured", disabledReason = "no home specified in tado set-up")
47+
fun setHeatingCircuitForZone() {
48+
val endpoint = "PUT /homes/{homeId}/zones/{zoneId}/control/heatingCircuit"
49+
val zoneControl = assertCorrectResponse { tadoStrictHeatingCircuitApiAPI.setHeatingCircuit(tadoConfig.home!!.id, tadoConfig.zone!!.heating!!.id) }
50+
verifyZoneControl(zoneControl, endpoint) }
51+
}
52+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package tadoclient.apis
2+
3+
class HomeByBridgeAPI_IT {
4+
}

tado-openapispec-v2.yaml

+29-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ info:
3131
[https://github.com/kritsel/tado-openapispec-v2](https://github.com/kritsel/tado-openapispec-v2)
3232
* Wiki for this GitHub repo with additional information:
3333
[https://github.com/kritsel/tado-openapispec-v2/wiki](https://github.com/kritsel/tado-openapispec-v2/wiki/)
34-
version: 2.2025.01.27.1
34+
version: 2.2025.02.02.0
3535
servers:
3636
- url: https://my.tado.com/api/v2/
3737
security:
@@ -2230,6 +2230,19 @@ paths:
22302230
schema:
22312231
$ref: '#/components/schemas/DeviceId'
22322232
required: true
2233+
requestBody:
2234+
required: true
2235+
content:
2236+
application/json:
2237+
schema:
2238+
$ref: '#/components/schemas/ChildLock'
2239+
examples:
2240+
celsius:
2241+
value:
2242+
celsius: 1.75
2243+
fahrenheit:
2244+
value:
2245+
fahrenheit: -2.25
22332246
responses:
22342247
'204':
22352248
description: successful response
@@ -2701,8 +2714,12 @@ paths:
27012714
serialNo:
27022715
$ref: '#/components/schemas/DeviceId'
27032716
responses:
2704-
'204':
2717+
'200':
27052718
description: successful response
2719+
content:
2720+
application/json:
2721+
schema:
2722+
$ref: '#/components/schemas/Device'
27062723
'401':
27072724
$ref: '#/components/responses/Unauthorized401'
27082725
'403':
@@ -3108,6 +3125,14 @@ components:
31083125
example: LOW
31093126
description: element of DayReport
31103127

3128+
ChildLock:
3129+
type: object
3130+
description: input for PUT /devices/{deviceId}/childLock
3131+
properties:
3132+
childLockEnabled:
3133+
type: boolean
3134+
example: false
3135+
31113136
# DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
31123137
DataInterval:
31133138
type: object
@@ -4187,6 +4212,8 @@ components:
41874212
* OPEN_WINDOW_DETECTED
41884213
41894214
* OVERLAY_ACTIVE
4215+
4216+
* MEASURING_DEVICE_DISCONNECTED
41904217
setting:
41914218
$ref: '#/components/schemas/ZoneSetting'
41924219

0 commit comments

Comments
 (0)