From 3cc6ee5d7d8be8f44e8b931541aca2f324bb8794 Mon Sep 17 00:00:00 2001 From: coreGreenberet Date: Mon, 5 Apr 2021 16:47:41 +0200 Subject: [PATCH 1/5] fixed access_control class closes #398 --- homematicip/base/enums.py | 2 +- homematicip_demo/json_data/home.json | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/homematicip/base/enums.py b/homematicip/base/enums.py index 2f2279e0..39a77ced 100644 --- a/homematicip/base/enums.py +++ b/homematicip/base/enums.py @@ -328,11 +328,11 @@ class AutomationRuleType(AutoNameEnum): class FunctionalHomeType(AutoNameEnum): + ACCESS_CONTROL = auto() INDOOR_CLIMATE = auto() LIGHT_AND_SHADOW = auto() SECURITY_AND_ALARM = auto() WEATHER_AND_ENVIRONMENT = auto() - ACCESS_CONTROL = auto() class EventType(AutoNameEnum): diff --git a/homematicip_demo/json_data/home.json b/homematicip_demo/json_data/home.json index 8c86a683..bd6c6059 100644 --- a/homematicip_demo/json_data/home.json +++ b/homematicip_demo/json_data/home.json @@ -8396,8 +8396,13 @@ "solution": "WEATHER_AND_ENVIRONMENT" }, "ACCESS_CONTROL": { - "active": true, + "accessAuthorizationProfileGroups": [], + "active": false, + "autoRelockProfileGroups": [], + "extendedLinkedGarageDoorGroups": [], + "extendedLinkedNotificationGroups": [], "functionalGroups": [], + "lockProfileGroups": [], "solution": "ACCESS_CONTROL" } }, From ce2d1b7ae5b4817efffe02640d346d432e527c47 Mon Sep 17 00:00:00 2001 From: coreGreenberet Date: Mon, 5 Apr 2021 16:54:12 +0200 Subject: [PATCH 2/5] fixed #391 --- homematicip/aio/class_maps.py | 1 + tests/test_devices.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/homematicip/aio/class_maps.py b/homematicip/aio/class_maps.py index befedf6f..63e248e4 100644 --- a/homematicip/aio/class_maps.py +++ b/homematicip/aio/class_maps.py @@ -53,6 +53,7 @@ DeviceType.PRINTED_CIRCUIT_BOARD_SWITCH_BATTERY: AsyncPrintedCircuitBoardSwitchBattery, DeviceType.PUSH_BUTTON: AsyncPushButton, DeviceType.PUSH_BUTTON_6: AsyncPushButton6, + DeviceType.PUSH_BUTTON_FLAT: AsyncPushButtonFlat, DeviceType.REMOTE_CONTROL_8: AsyncRemoteControl8, DeviceType.REMOTE_CONTROL_8_MODULE: AsyncRemoteControl8Module, DeviceType.ROOM_CONTROL_DEVICE: AsyncRoomControlDevice, diff --git a/tests/test_devices.py b/tests/test_devices.py index cabf51dd..8369bebf 100644 --- a/tests/test_devices.py +++ b/tests/test_devices.py @@ -986,8 +986,9 @@ def test_push_button_6(fake_home: Home): def test_push_button_flat(fake_home: Home): - d = PushButton6(fake_home._connection) + d = PushButtonFlat(fake_home._connection) d = fake_home.search_device_by_id("3014F711PUSH_BUTTON_FLAT") + assert isinstance(d,PushButtonFlat) assert d.modelId == 431 assert d.label == "Wandtaster" From 8ab3d998d8e4c4b4d11e283889ccc2c9b6cf3f5e Mon Sep 17 00:00:00 2001 From: coreGreenberet Date: Mon, 5 Apr 2021 16:57:21 +0200 Subject: [PATCH 3/5] black --- homematicip/functionalHomes.py | 4 +--- tests/test_devices.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/homematicip/functionalHomes.py b/homematicip/functionalHomes.py index ede86d23..4f71041b 100644 --- a/homematicip/functionalHomes.py +++ b/homematicip/functionalHomes.py @@ -141,9 +141,7 @@ def from_json(self, js, groups: List[Group]): self.accessAuthorizationProfileGroups = self.assignGroups( js["accessAuthorizationProfileGroups"], groups ) - self.lockProfileGroups = self.assignGroups( - js["lockProfileGroups"], groups - ) + self.lockProfileGroups = self.assignGroups(js["lockProfileGroups"], groups) self.autoRelockProfileGroups = self.assignGroups( js["autoRelockProfileGroups"], groups ) diff --git a/tests/test_devices.py b/tests/test_devices.py index 8369bebf..b5e7ef29 100644 --- a/tests/test_devices.py +++ b/tests/test_devices.py @@ -988,7 +988,7 @@ def test_push_button_6(fake_home: Home): def test_push_button_flat(fake_home: Home): d = PushButtonFlat(fake_home._connection) d = fake_home.search_device_by_id("3014F711PUSH_BUTTON_FLAT") - assert isinstance(d,PushButtonFlat) + assert isinstance(d, PushButtonFlat) assert d.modelId == 431 assert d.label == "Wandtaster" From 4d038262a9041820ce932ee580f544433a3e0436 Mon Sep 17 00:00:00 2001 From: coreGreenberet Date: Mon, 5 Apr 2021 17:08:56 +0200 Subject: [PATCH 4/5] updated CHANGELOG.md --- CHANGELOG.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70b03e09..310332d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,13 +4,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [1.0.0] 2021-04-05 ### ADDED -- API - Devices - [HmIP-STE2-PCB] (Temperature Difference Sensors - 2x sensors) +### FIXED +- API + - [BUG: 387] Groups were missing in the functional channels of devices + - [BUG: 398] 'ACCESS_CONTROL' isn't a valid option for class 'FunctionalHomeType' + - [BUG: 391] There is no class for device 'PUSH_BUTTON_FLAT' yet + ## [0.13.1] 2021-01-23 ### ADDED @@ -410,6 +415,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [PR: 320]: https://github.com/coreGreenberet/homematicip-rest-api/pull/320 [BUG: 325]: https://github.com/coreGreenberet/homematicip-rest-api/issues/325 [BUG: 342]: https://github.com/coreGreenberet/homematicip-rest-api/issues/342 +[BUG: 387]: https://github.com/coreGreenberet/homematicip-rest-api/issues/387 +[BUG: 391]: https://github.com/coreGreenberet/homematicip-rest-api/issues/391 +[BUG: 398]: https://github.com/coreGreenberet/homematicip-rest-api/issues/398 [HMIP-FALMOT-C12]: https://github.com/coreGreenberet/homematicip-rest-api/issues/281 [HMIP-WHS2]: https://github.com/coreGreenberet/homematicip-rest-api/issues/280 From c772edacb4f5e463dd8b20576a962ba2db36e1d7 Mon Sep 17 00:00:00 2001 From: coreGreenberet Date: Mon, 5 Apr 2021 17:30:23 +0200 Subject: [PATCH 5/5] fixed changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 310332d2..1c08cd12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -373,7 +373,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - API -- Support for the new HMIP Cloud Update -[Unreleased]: https://github.com/coreGreenberet/homematicip-rest-api/compare/0.13.1...HEAD +[1.0.0]: https://github.com/coreGreenberet/homematicip-rest-api/compare/0.13.1...1.0.0 [0.13.1]: https://github.com/coreGreenberet/homematicip-rest-api/compare/0.13.0...0.13.1 [0.13.0]: https://github.com/coreGreenberet/homematicip-rest-api/compare/0.12.1...0.13.0 [0.12.1]: https://github.com/coreGreenberet/homematicip-rest-api/compare/0.12.0...0.12.1