Skip to content

Commit 7c58bf7

Browse files
committed
adjust tests for AC control
1 parent 33e75b1 commit 7c58bf7

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed

tado-api-test/src/test/kotlin/tadoclient/apis/DeviceApi_IT.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,10 @@ class DeviceApi_IT (
108108
val endpoint = "GET /homes/{homeId}/installations"
109109
val installations = assertCorrectResponse { tadoStrictDeviceAPI.getInstallations(tadoConfig.home!!.id) }
110110

111-
// this operation appears to be practically deprected, as it always returns an empty array
112-
// let's verify if that is still the case
113-
assertEquals(0, installations.size)
111+
// returns AC installations
112+
assertEquals(1, installations.size)
113+
114+
// todo: implement an verifyInstallation method
114115
}
115116

116117
@Test

tado-api-test/src/test/kotlin/tadoclient/verify/DeviceAPI_verify.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ fun verifyDevice(device: Any, context:String, parentName:String, typeName:String
2323
"$typeName.childLockEnabled",
2424
"$typeName.isDriverConfigured",
2525
"$typeName.inPairingMode",
26-
"$typeName.characteristics" // not available for IB01
26+
"$typeName.characteristics", // not available for IB01
27+
"$typeName.accessPointWiFi", // only available for WR02
28+
"$typeName.commandTableUploadState" // only available for WR02
2729
),
2830
// capabilities empty for BR02
2931
emptyCollectionAllowedProperties = listOf("$typeName.characteristics.capabilities"))

tado-api-test/src/test/kotlin/tadoclient/verify/ReportAPI_verify.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ fun verifyDayReport(zoneType: ZoneType, dayReport:DayReport, context:String, par
1010
verifyNested(
1111
dayReport, context, parentName, typeName,
1212
// settings is only available when a schedule or overlay was active with setting.power = ON
13-
nullAllowedProperties = listOf("$typeName.settings"),
14-
stopAtProperties = listOf("$typeName.stripes.dataIntervals[i].value.setting")
13+
nullAllowedProperties = listOf(
14+
"$typeName.settings",
15+
"$typeName.acActivity"),
16+
stopAtProperties = listOf(
17+
"$typeName.stripes.dataIntervals[i].value",
18+
"$typeName.settings.dataIntervals[i].value")
1519
)
1620

1721
dayReport.stripes?.dataIntervals?.forEachIndexed { i, elem ->

tado-api-test/src/test/kotlin/tadoclient/verify/ZoneAPI_verify.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,20 @@ fun verifyZoneState(zoneInfo: Pair<ZoneType, Boolean>, zoneState: ZoneState, con
5050
when (zoneInfo.first) {
5151

5252
ZoneType.HEATING -> {
53+
val heatingNullAllowedProperties = mutableListOf(
54+
"$typeName.nextTimeBlock",
55+
"$typeName.activityDataPoints.acPower")
56+
heatingNullAllowedProperties.addAll(basicNullAllowedProperties)
5357
verifyNested(zoneState, context, fullParentName, typeName,
54-
nullAllowedProperties = basicNullAllowedProperties,
58+
nullAllowedProperties = heatingNullAllowedProperties,
5559
stopAtProperties = basicStopAtProperties)
5660
}
5761

5862
ZoneType.HOT_WATER -> {
5963
val hotWaterNullAllowedProperties = mutableListOf(
6064
"$typeName.nextTimeBlock",
6165
"$typeName.activityDataPoints.heatingPower",
66+
"$typeName.activityDataPoints.acPower",
6267
"$typeName.sensorDataPoints.humidity",
6368
"$typeName.sensorDataPoints.insideTemperature")
6469
hotWaterNullAllowedProperties.addAll(basicNullAllowedProperties)

0 commit comments

Comments
 (0)