From c122f3f4feaf2cd2f13f26c3a0d9ae29c20c5d2b Mon Sep 17 00:00:00 2001 From: Christopher Fenner <9592452+CFenner@users.noreply.github.com> Date: Wed, 20 Nov 2024 07:11:33 +0100 Subject: [PATCH 1/2] chore(testdata): Update Vitoair FS300E data (#455) * Update VitoairFs300E.json * Update test_VitoairFs300E.py --- tests/response/VitoairFs300E.json | 440 +++++++++++++++++++++--------- tests/test_VitoairFs300E.py | 4 +- 2 files changed, 306 insertions(+), 138 deletions(-) diff --git a/tests/response/VitoairFs300E.json b/tests/response/VitoairFs300E.json index 0bd5795e..5f1bcd70 100644 --- a/tests/response/VitoairFs300E.json +++ b/tests/response/VitoairFs300E.json @@ -3,7 +3,7 @@ { "apiVersion": 1, "commands": {}, - "deviceId": "0", + "deviceId": "################", "feature": "device.messages.errors.raw", "gatewayId": "################", "isEnabled": true, @@ -14,13 +14,13 @@ "value": [] } }, - "timestamp": "2024-08-29T00:05:42.082Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/device.messages.errors.raw" + "timestamp": "2024-11-07T02:31:11.736Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/device.messages.errors.raw" }, { "apiVersion": 1, "commands": {}, - "deviceId": "0", + "deviceId": "################", "feature": "device.productIdentification", "gatewayId": "################", "isEnabled": true, @@ -29,20 +29,20 @@ "product": { "type": "object", "value": { - "busAddress": 1, + "busAddress": 71, "busType": "CanExternal", "productFamily": "B_00028_VA330", "viessmannIdentificationNumber": "################" } } }, - "timestamp": "2024-08-29T00:05:42.082Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/device.productIdentification" + "timestamp": "2024-11-07T02:31:11.736Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/device.productIdentification" }, { "apiVersion": 1, "commands": {}, - "deviceId": "0", + "deviceId": "################", "feature": "device.serial", "gatewayId": "################", "isEnabled": true, @@ -53,13 +53,30 @@ "value": "################" } }, - "timestamp": "2024-08-29T00:05:42.082Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/device.serial" + "timestamp": "2024-11-07T02:31:11.736Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/device.serial" }, { "apiVersion": 1, "commands": {}, - "deviceId": "0", + "deviceId": "################", + "feature": "heating.boiler.serial", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "value": { + "type": "string", + "value": "################" + } + }, + "timestamp": "2024-11-07T02:31:11.736Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/heating.boiler.serial" + }, + { + "apiVersion": 1, + "commands": {}, + "deviceId": "################", "feature": "ventilation", "gatewayId": "################", "isEnabled": true, @@ -70,13 +87,13 @@ "value": true } }, - "timestamp": "2024-08-29T00:05:42.082Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation" + "timestamp": "2024-11-07T02:31:11.736Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation" }, { "apiVersion": 1, "commands": {}, - "deviceId": "0", + "deviceId": "################", "feature": "ventilation.levels.levelFour", "gatewayId": "################", "isEnabled": true, @@ -85,16 +102,16 @@ "volumeFlow": { "type": "number", "unit": "cubicMeter/hour", - "value": 260 + "value": 240 } }, - "timestamp": "2024-08-29T00:05:42.082Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.levels.levelFour" + "timestamp": "2024-11-07T02:31:11.736Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.levels.levelFour" }, { "apiVersion": 1, "commands": {}, - "deviceId": "0", + "deviceId": "################", "feature": "ventilation.levels.levelOne", "gatewayId": "################", "isEnabled": true, @@ -103,16 +120,16 @@ "volumeFlow": { "type": "number", "unit": "cubicMeter/hour", - "value": 60 + "value": 55 } }, - "timestamp": "2024-08-29T00:05:42.082Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.levels.levelOne" + "timestamp": "2024-11-07T02:31:11.736Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.levels.levelOne" }, { "apiVersion": 1, "commands": {}, - "deviceId": "0", + "deviceId": "################", "feature": "ventilation.levels.levelThree", "gatewayId": "################", "isEnabled": true, @@ -121,16 +138,16 @@ "volumeFlow": { "type": "number", "unit": "cubicMeter/hour", - "value": 200 + "value": 185 } }, - "timestamp": "2024-08-29T00:05:42.082Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.levels.levelThree" + "timestamp": "2024-11-07T02:31:11.736Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.levels.levelThree" }, { "apiVersion": 1, "commands": {}, - "deviceId": "0", + "deviceId": "################", "feature": "ventilation.levels.levelTwo", "gatewayId": "################", "isEnabled": true, @@ -139,11 +156,11 @@ "volumeFlow": { "type": "number", "unit": "cubicMeter/hour", - "value": 140 + "value": 129 } }, - "timestamp": "2024-08-29T00:05:42.082Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.levels.levelTwo" + "timestamp": "2024-11-07T02:31:11.736Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.levels.levelTwo" }, { "apiVersion": 1, @@ -165,16 +182,16 @@ "type": "string" } }, - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.modes.active/commands/setMode" + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.modes.active/commands/setMode" }, "setModeContinuousSensorOverride": { "isExecutable": true, "name": "setModeContinuousSensorOverride", "params": {}, - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.modes.active/commands/setModeContinuousSensorOverride" + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.modes.active/commands/setModeContinuousSensorOverride" } }, - "deviceId": "0", + "deviceId": "################", "feature": "ventilation.operating.modes.active", "gatewayId": "################", "isEnabled": true, @@ -182,16 +199,16 @@ "properties": { "value": { "type": "string", - "value": "permanent" + "value": "sensorOverride" } }, - "timestamp": "2024-08-29T00:05:42.082Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.modes.active" + "timestamp": "2024-11-07T02:31:12.967Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.modes.active" }, { "apiVersion": 1, "commands": {}, - "deviceId": "0", + "deviceId": "################", "feature": "ventilation.operating.modes.filterChange", "gatewayId": "################", "isEnabled": true, @@ -202,8 +219,8 @@ "value": false } }, - "timestamp": "2024-08-29T00:05:42.082Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.modes.filterChange" + "timestamp": "2024-11-07T02:31:11.736Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.modes.filterChange" }, { "apiVersion": 1, @@ -225,10 +242,10 @@ "type": "string" } }, - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.modes.permanent/commands/setLevel" + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.modes.permanent/commands/setLevel" } }, - "deviceId": "0", + "deviceId": "################", "feature": "ventilation.operating.modes.permanent", "gatewayId": "################", "isEnabled": true, @@ -236,16 +253,16 @@ "properties": { "active": { "type": "boolean", - "value": true + "value": false } }, - "timestamp": "2024-08-29T10:32:31.635Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.modes.permanent" + "timestamp": "2024-11-07T07:20:15.814Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.modes.permanent" }, { "apiVersion": 1, "commands": {}, - "deviceId": "0", + "deviceId": "################", "feature": "ventilation.operating.modes.sensorDriven", "gatewayId": "################", "isEnabled": true, @@ -256,13 +273,13 @@ "value": false } }, - "timestamp": "2024-08-29T00:05:42.082Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.modes.sensorDriven" + "timestamp": "2024-11-07T02:31:11.736Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.modes.sensorDriven" }, { "apiVersion": 1, "commands": {}, - "deviceId": "0", + "deviceId": "################", "feature": "ventilation.operating.modes.sensorOverride", "gatewayId": "################", "isEnabled": true, @@ -270,16 +287,16 @@ "properties": { "active": { "type": "boolean", - "value": false + "value": true } }, - "timestamp": "2024-08-29T00:05:42.082Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.modes.sensorOverride" + "timestamp": "2024-11-07T02:31:11.736Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.modes.sensorOverride" }, { "apiVersion": 1, "commands": {}, - "deviceId": "0", + "deviceId": "################", "feature": "ventilation.operating.modes.ventilation", "gatewayId": "################", "isEnabled": true, @@ -290,13 +307,13 @@ "value": false } }, - "timestamp": "2024-08-29T00:05:42.082Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.modes.ventilation" + "timestamp": "2024-11-07T02:31:11.736Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.modes.ventilation" }, { "apiVersion": 1, "commands": {}, - "deviceId": "0", + "deviceId": "################", "feature": "ventilation.operating.programs.active", "gatewayId": "################", "isEnabled": true, @@ -304,11 +321,11 @@ "properties": { "value": { "type": "string", - "value": "levelOne" + "value": "levelFour" } }, - "timestamp": "2024-08-29T10:32:31.635Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.programs.active" + "timestamp": "2024-11-07T07:20:15.814Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.programs.active" }, { "apiVersion": 1, @@ -328,14 +345,14 @@ "type": "number" } }, - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.programs.forcedLevelFour/commands/activate" + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.programs.forcedLevelFour/commands/activate" }, "deactivate": { "isDeprecated": true, "isExecutable": true, "name": "deactivate", "params": {}, - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.programs.forcedLevelFour/commands/deactivate" + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.programs.forcedLevelFour/commands/deactivate" }, "setDefaultRuntime": { "isDeprecated": true, @@ -352,7 +369,7 @@ "type": "number" } }, - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.programs.forcedLevelFour/commands/setDefaultRuntime" + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.programs.forcedLevelFour/commands/setDefaultRuntime" }, "setTimeout": { "isDeprecated": true, @@ -369,14 +386,14 @@ "type": "number" } }, - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.programs.forcedLevelFour/commands/setTimeout" + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.programs.forcedLevelFour/commands/setTimeout" } }, "deprecated": { "info": "none", "removalDate": "2024-09-15" }, - "deviceId": "0", + "deviceId": "################", "feature": "ventilation.operating.programs.forcedLevelFour", "gatewayId": "################", "isEnabled": true, @@ -389,15 +406,15 @@ "defaultRuntime": { "type": "number", "unit": "minutes", - "value": 30 + "value": 10 }, "isActiveWritable": { "type": "boolean", "value": true } }, - "timestamp": "2024-08-29T00:05:42.082Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.programs.forcedLevelFour" + "timestamp": "2024-11-07T02:31:12.967Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.programs.forcedLevelFour" }, { "apiVersion": 1, @@ -406,7 +423,7 @@ "info": "none", "removalDate": "2024-09-15" }, - "deviceId": "0", + "deviceId": "################", "feature": "ventilation.operating.programs.levelFour", "gatewayId": "################", "isEnabled": true, @@ -414,16 +431,16 @@ "properties": { "active": { "type": "boolean", - "value": false + "value": true }, "volumeFlow": { "type": "number", "unit": "cubicMeter/hour", - "value": 260 + "value": 240 } }, - "timestamp": "2024-08-29T00:05:42.082Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.programs.levelFour" + "timestamp": "2024-11-07T07:20:15.814Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.programs.levelFour" }, { "apiVersion": 1, @@ -432,7 +449,7 @@ "info": "none", "removalDate": "2024-09-15" }, - "deviceId": "0", + "deviceId": "################", "feature": "ventilation.operating.programs.levelOne", "gatewayId": "################", "isEnabled": true, @@ -440,16 +457,16 @@ "properties": { "active": { "type": "boolean", - "value": true + "value": false }, "volumeFlow": { "type": "number", "unit": "cubicMeter/hour", - "value": 60 + "value": 55 } }, - "timestamp": "2024-08-29T10:32:31.635Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.programs.levelOne" + "timestamp": "2024-11-07T07:20:15.814Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.programs.levelOne" }, { "apiVersion": 1, @@ -458,7 +475,7 @@ "info": "none", "removalDate": "2024-09-15" }, - "deviceId": "0", + "deviceId": "################", "feature": "ventilation.operating.programs.levelThree", "gatewayId": "################", "isEnabled": true, @@ -471,11 +488,11 @@ "volumeFlow": { "type": "number", "unit": "cubicMeter/hour", - "value": 200 + "value": 185 } }, - "timestamp": "2024-08-29T00:05:42.082Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.programs.levelThree" + "timestamp": "2024-11-07T02:31:11.736Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.programs.levelThree" }, { "apiVersion": 1, @@ -484,7 +501,7 @@ "info": "none", "removalDate": "2024-09-15" }, - "deviceId": "0", + "deviceId": "################", "feature": "ventilation.operating.programs.levelTwo", "gatewayId": "################", "isEnabled": true, @@ -497,11 +514,11 @@ "volumeFlow": { "type": "number", "unit": "cubicMeter/hour", - "value": 140 + "value": 129 } }, - "timestamp": "2024-08-29T10:32:31.635Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.programs.levelTwo" + "timestamp": "2024-11-07T02:31:11.736Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.programs.levelTwo" }, { "apiVersion": 1, @@ -521,14 +538,14 @@ "type": "number" } }, - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.programs.silent/commands/activate" + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.programs.silent/commands/activate" }, "deactivate": { "isDeprecated": true, "isExecutable": true, "name": "deactivate", "params": {}, - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.programs.silent/commands/deactivate" + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.programs.silent/commands/deactivate" }, "setDefaultRuntime": { "isDeprecated": true, @@ -545,7 +562,7 @@ "type": "number" } }, - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.programs.silent/commands/setDefaultRuntime" + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.programs.silent/commands/setDefaultRuntime" }, "setTimeout": { "isDeprecated": true, @@ -562,14 +579,14 @@ "type": "number" } }, - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.programs.silent/commands/setTimeout" + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.programs.silent/commands/setTimeout" } }, "deprecated": { "info": "none", "removalDate": "2024-09-15" }, - "deviceId": "0", + "deviceId": "################", "feature": "ventilation.operating.programs.silent", "gatewayId": "################", "isEnabled": true, @@ -582,20 +599,20 @@ "defaultRuntime": { "type": "number", "unit": "minutes", - "value": 30 + "value": 60 }, "isActiveWritable": { "type": "boolean", "value": true } }, - "timestamp": "2024-08-29T00:05:42.082Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.programs.silent" + "timestamp": "2024-11-07T02:31:12.967Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.programs.silent" }, { "apiVersion": 1, "commands": {}, - "deviceId": "0", + "deviceId": "################", "feature": "ventilation.operating.programs.standby", "gatewayId": "################", "isEnabled": true, @@ -611,8 +628,33 @@ "value": 0 } }, - "timestamp": "2024-08-29T00:05:42.082Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.operating.programs.standby" + "timestamp": "2024-11-07T02:31:11.736Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.programs.standby" + }, + { + "apiVersion": 1, + "commands": {}, + "deviceId": "################", + "feature": "ventilation.operating.state", + "gatewayId": "################", + "isEnabled": true, + "isReady": true, + "properties": { + "demand": { + "type": "string", + "value": "unknown" + }, + "level": { + "type": "string", + "value": "levelFour" + }, + "reason": { + "type": "string", + "value": "sensorOverride" + } + }, + "timestamp": "2024-11-07T07:20:15.814Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.operating.state" }, { "apiVersion": 1, @@ -631,13 +673,13 @@ "type": "number" } }, - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.quickmodes.forcedLevelFour/commands/activate" + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.quickmodes.forcedLevelFour/commands/activate" }, "deactivate": { "isExecutable": true, "name": "deactivate", "params": {}, - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.quickmodes.forcedLevelFour/commands/deactivate" + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.quickmodes.forcedLevelFour/commands/deactivate" }, "setDefaultRuntime": { "isExecutable": true, @@ -653,7 +695,7 @@ "type": "number" } }, - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.quickmodes.forcedLevelFour/commands/setDefaultRuntime" + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.quickmodes.forcedLevelFour/commands/setDefaultRuntime" }, "setTimeout": { "isExecutable": true, @@ -669,10 +711,10 @@ "type": "number" } }, - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.quickmodes.forcedLevelFour/commands/setTimeout" + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.quickmodes.forcedLevelFour/commands/setTimeout" } }, - "deviceId": "0", + "deviceId": "################", "feature": "ventilation.quickmodes.forcedLevelFour", "gatewayId": "################", "isEnabled": true, @@ -685,15 +727,15 @@ "defaultRuntime": { "type": "number", "unit": "minutes", - "value": 30 + "value": 10 }, "isActiveWritable": { "type": "boolean", "value": true } }, - "timestamp": "2024-08-29T00:05:42.082Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.quickmodes.forcedLevelFour" + "timestamp": "2024-11-07T02:31:12.967Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.quickmodes.forcedLevelFour" }, { "apiVersion": 1, @@ -712,13 +754,13 @@ "type": "number" } }, - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.quickmodes.silent/commands/activate" + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.quickmodes.silent/commands/activate" }, "deactivate": { "isExecutable": true, "name": "deactivate", "params": {}, - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.quickmodes.silent/commands/deactivate" + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.quickmodes.silent/commands/deactivate" }, "setDefaultRuntime": { "isExecutable": true, @@ -734,7 +776,7 @@ "type": "number" } }, - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.quickmodes.silent/commands/setDefaultRuntime" + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.quickmodes.silent/commands/setDefaultRuntime" }, "setTimeout": { "isExecutable": true, @@ -750,10 +792,10 @@ "type": "number" } }, - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.quickmodes.silent/commands/setTimeout" + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.quickmodes.silent/commands/setTimeout" } }, - "deviceId": "0", + "deviceId": "################", "feature": "ventilation.quickmodes.silent", "gatewayId": "################", "isEnabled": true, @@ -766,15 +808,15 @@ "defaultRuntime": { "type": "number", "unit": "minutes", - "value": 30 + "value": 60 }, "isActiveWritable": { "type": "boolean", "value": true } }, - "timestamp": "2024-08-29T00:05:42.082Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.quickmodes.silent" + "timestamp": "2024-11-07T02:31:12.967Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.quickmodes.silent" }, { "apiVersion": 1, @@ -783,7 +825,7 @@ "isExecutable": false, "name": "resetSchedule", "params": {}, - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.schedule/commands/resetSchedule" + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.schedule/commands/resetSchedule" }, "setSchedule": { "isExecutable": true, @@ -805,10 +847,10 @@ "type": "Schedule" } }, - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.schedule/commands/setSchedule" + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.schedule/commands/setSchedule" } }, - "deviceId": "0", + "deviceId": "################", "feature": "ventilation.schedule", "gatewayId": "################", "isEnabled": true, @@ -823,65 +865,191 @@ "value": { "fri": [ { - "end": "22:00", - "mode": "levelTwo", + "end": "08:10", + "mode": "levelFour", "position": 0, - "start": "06:00" + "start": "07:20" + }, + { + "end": "18:30", + "mode": "levelFour", + "position": 1, + "start": "17:00" + }, + { + "end": "21:30", + "mode": "levelTwo", + "position": 2, + "start": "18:30" + }, + { + "end": "17:00", + "mode": "levelTwo", + "position": 3, + "start": "08:20" } ], "mon": [ { - "end": "22:00", - "mode": "levelTwo", + "end": "08:10", + "mode": "levelFour", "position": 0, - "start": "06:00" + "start": "07:20" + }, + { + "end": "18:30", + "mode": "levelFour", + "position": 1, + "start": "17:00" + }, + { + "end": "21:30", + "mode": "levelTwo", + "position": 2, + "start": "18:30" + }, + { + "end": "17:00", + "mode": "levelTwo", + "position": 3, + "start": "08:20" } ], "sat": [ { - "end": "22:00", - "mode": "levelTwo", + "end": "09:00", + "mode": "levelFour", "position": 0, - "start": "06:00" + "start": "08:30" + }, + { + "end": "18:30", + "mode": "levelFour", + "position": 1, + "start": "17:00" + }, + { + "end": "21:30", + "mode": "levelTwo", + "position": 2, + "start": "18:30" + }, + { + "end": "17:00", + "mode": "levelThree", + "position": 3, + "start": "10:00" } ], "sun": [ { - "end": "22:00", - "mode": "levelTwo", + "end": "09:00", + "mode": "levelFour", "position": 0, - "start": "06:00" + "start": "08:30" + }, + { + "end": "18:30", + "mode": "levelFour", + "position": 1, + "start": "17:00" + }, + { + "end": "21:30", + "mode": "levelTwo", + "position": 2, + "start": "18:30" + }, + { + "end": "17:00", + "mode": "levelThree", + "position": 3, + "start": "10:00" } ], "thu": [ { - "end": "22:00", - "mode": "levelTwo", + "end": "08:10", + "mode": "levelFour", "position": 0, - "start": "06:00" + "start": "07:20" + }, + { + "end": "18:30", + "mode": "levelFour", + "position": 1, + "start": "17:00" + }, + { + "end": "21:30", + "mode": "levelTwo", + "position": 2, + "start": "18:30" + }, + { + "end": "17:00", + "mode": "levelTwo", + "position": 3, + "start": "08:20" } ], "tue": [ { - "end": "22:00", - "mode": "levelTwo", + "end": "08:10", + "mode": "levelFour", "position": 0, - "start": "06:00" + "start": "07:20" + }, + { + "end": "18:30", + "mode": "levelFour", + "position": 1, + "start": "17:00" + }, + { + "end": "21:30", + "mode": "levelTwo", + "position": 2, + "start": "18:30" + }, + { + "end": "17:00", + "mode": "levelThree", + "position": 3, + "start": "08:20" } ], "wed": [ { - "end": "22:00", - "mode": "levelTwo", + "end": "08:10", + "mode": "levelFour", "position": 0, - "start": "06:00" + "start": "07:20" + }, + { + "end": "18:30", + "mode": "levelFour", + "position": 1, + "start": "17:00" + }, + { + "end": "21:30", + "mode": "levelTwo", + "position": 2, + "start": "18:30" + }, + { + "end": "17:00", + "mode": "levelTwo", + "position": 3, + "start": "08:20" } ] } } }, - "timestamp": "2024-08-29T00:05:42.082Z", - "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/0/features/ventilation.schedule" + "timestamp": "2024-11-07T02:31:11.736Z", + "uri": "https://api.viessmann.com/iot/v1/features/installations/#######/gateways/################/devices/################/features/ventilation.schedule" } ] } diff --git a/tests/test_VitoairFs300E.py b/tests/test_VitoairFs300E.py index a0963c1f..7fb7991b 100644 --- a/tests/test_VitoairFs300E.py +++ b/tests/test_VitoairFs300E.py @@ -19,10 +19,10 @@ def test_isVentilationDevice(self): self.assertEqual(self.device.isVentilationDevice(), True) def test_getActiveMode(self): - self.assertEqual(self.device.getActiveMode(), "permanent") + self.assertEqual(self.device.getActiveMode(), "sensorOverride") def test_getActiveProgram(self): - self.assertEqual(self.device.getActiveProgram(), "levelOne") + self.assertEqual(self.device.getActiveProgram(), "levelFour") def test_getAvailableModes(self): expected_modes = ['permanent', 'ventilation', 'sensorOverride', 'sensorDriven'] From 68bb80b859bc38b45a13a835dce20064f82b8788 Mon Sep 17 00:00:00 2001 From: Christopher Fenner <9592452+CFenner@users.noreply.github.com> Date: Wed, 20 Nov 2024 07:34:55 +0100 Subject: [PATCH 2/2] feat: Expose ventilation state (#456) * Update PyViCareVentilationDevice.py * Update test_VitoairFs300E.py * Update test_Vitopure350.py * Update test_VitoairFs300E.py * Update test_Vitopure350.py * Update test_Vitopure350.py * Update test_VitoairFs300E.py * Update test_VitoairFs300E.py --- PyViCare/PyViCareVentilationDevice.py | 12 ++++++++++++ tests/test_VitoairFs300E.py | 5 +++++ tests/test_Vitopure350.py | 5 +++++ 3 files changed, 22 insertions(+) diff --git a/PyViCare/PyViCareVentilationDevice.py b/PyViCare/PyViCareVentilationDevice.py index a232ce88..39bd586c 100644 --- a/PyViCare/PyViCareVentilationDevice.py +++ b/PyViCare/PyViCareVentilationDevice.py @@ -91,3 +91,15 @@ def getSchedule(self): "sat": properties["entries"]["value"]["sat"], "sun": properties["entries"]["value"]["sun"] } + + @handleNotSupported + def getVentilationDemand(self) -> str: + return str(self.service.getProperty("ventilation.operating.state")["properties"]["demand"]["value"]) + + @handleNotSupported + def getVentilationLevel(self) -> str: + return str(self.service.getProperty("ventilation.operating.state")["properties"]["level"]["value"]) + + @handleNotSupported + def getVentilationReason(self) -> str: + return str(self.service.getProperty("ventilation.operating.state")["properties"]["reason"]["value"]) diff --git a/tests/test_VitoairFs300E.py b/tests/test_VitoairFs300E.py index 7fb7991b..79362da6 100644 --- a/tests/test_VitoairFs300E.py +++ b/tests/test_VitoairFs300E.py @@ -38,3 +38,8 @@ def test_getSchedule(self): def test_getSerial(self): self.assertEqual(self.device.getSerial(), "################") + + def test_ventilationState(self): + self.assertEqual(self.device.getVentilationDemand(), "unknown") + self.assertEqual(self.device.getVentilationLevel(), "levelFour") + self.assertEqual(self.device.getVentilationReason(), "sensorOverride") diff --git a/tests/test_Vitopure350.py b/tests/test_Vitopure350.py index 9b32282b..936b9b5d 100644 --- a/tests/test_Vitopure350.py +++ b/tests/test_Vitopure350.py @@ -31,3 +31,8 @@ def test_getSchedule(self): def test_getSerial(self): with self.assertRaises(PyViCareNotSupportedFeatureError): self.device.getSerial() + + def test_ventilationState(self): + self.assertEqual(self.device.getVentilationDemand(), "unknown") + self.assertEqual(self.device.getVentilationLevel(), "unknown") + self.assertEqual(self.device.getVentilationReason(), "sensorDriven")