From 5ecdbc470a1c852760a1556b0dd0dd9c172f4e7a Mon Sep 17 00:00:00 2001 From: Bouwe Date: Mon, 9 May 2022 13:07:46 +0200 Subject: [PATCH 1/6] Adam: clear vacation-preset from list Implements issue #185 --- plugwise/smile.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugwise/smile.py b/plugwise/smile.py index ad9977a03..37a548abc 100644 --- a/plugwise/smile.py +++ b/plugwise/smile.py @@ -144,7 +144,12 @@ def _device_data_climate( device_data["preset_modes"] = None device_data["active_preset"] = None if presets := self._presets(loc_id): - device_data["preset_modes"] = list(presets) + presets_list = list(presets) + # Adam does not show vacation preset anymore, issue #185 + if self.smile_name == "Adam": + presets_list.remove("vacation") + device_data["preset_modes"] = presets_list + device_data["active_preset"] = self._preset(loc_id) # Schedule From 2026c3f2816b6e01cb8f3c97048c27fdb17fafb6 Mon Sep 17 00:00:00 2001 From: Bouwe Date: Mon, 9 May 2022 13:12:39 +0200 Subject: [PATCH 2/6] Update relevant test-asserts --- tests/test_smile.py | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/test_smile.py b/tests/test_smile.py index cad838749..255799999 100644 --- a/tests/test_smile.py +++ b/tests/test_smile.py @@ -1377,7 +1377,7 @@ async def test_connect_adam_plus_anna(self): "lower_bound": 1.0, "upper_bound": 35.0, "resolution": 0.01, - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": ["home", "asleep", "away", "no_frost"], "active_preset": "home", "available_schedules": ["Weekschema"], "selected_schedule": "Weekschema", @@ -1485,7 +1485,7 @@ async def test_connect_adam_plus_anna_new(self): "lower_bound": 1.0, "upper_bound": 35.0, "resolution": 0.01, - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": ["home", "asleep", "away", "no_frost"], "active_preset": "asleep", "available_schedules": ["Weekschema", "Badkamer", "Test"], "selected_schedule": "Weekschema", @@ -1575,7 +1575,7 @@ async def test_connect_adam_plus_anna_new(self): "lower_bound": 0.0, "upper_bound": 99.9, "resolution": 0.01, - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": ["home", "asleep", "away", "no_frost"], "active_preset": "home", "available_schedules": ["Weekschema", "Badkamer", "Test"], "selected_schedule": "Badkamer", @@ -1689,7 +1689,7 @@ async def test_connect_adam_zone_per_device(self): "lower_bound": 0.0, "upper_bound": 99.9, "resolution": 0.01, - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": ["home", "asleep", "away", "no_frost"], "active_preset": "away", "available_schedules": [ "CV Roan", @@ -1755,7 +1755,7 @@ async def test_connect_adam_zone_per_device(self): "lower_bound": 0.0, "upper_bound": 99.9, "resolution": 0.01, - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": ["home", "asleep", "away", "no_frost"], "active_preset": "home", "available_schedules": [ "CV Roan", @@ -1925,7 +1925,7 @@ async def test_connect_adam_zone_per_device(self): "lower_bound": 0.0, "upper_bound": 99.9, "resolution": 0.01, - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": ["home", "asleep", "away", "no_frost"], "active_preset": "asleep", "available_schedules": [ "CV Roan", @@ -1972,7 +1972,7 @@ async def test_connect_adam_zone_per_device(self): "lower_bound": 0.0, "upper_bound": 99.9, "resolution": 0.01, - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": ["home", "asleep", "away", "no_frost"], "active_preset": "away", "available_schedules": [ "CV Roan", @@ -2015,7 +2015,7 @@ async def test_connect_adam_zone_per_device(self): "lower_bound": 0.0, "upper_bound": 100.0, "resolution": 0.01, - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": ["home", "asleep", "away", "no_frost"], "active_preset": "no_frost", "available_schedules": [ "CV Roan", @@ -2109,7 +2109,7 @@ async def test_connect_adam_multiple_devices_per_zone(self): "lower_bound": 0.0, "upper_bound": 99.9, "resolution": 0.01, - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": ["home", "asleep", "away", "no_frost"], "active_preset": "away", "available_schedules": [ "CV Roan", @@ -2175,7 +2175,7 @@ async def test_connect_adam_multiple_devices_per_zone(self): "lower_bound": 0.0, "upper_bound": 99.9, "resolution": 0.01, - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": ["home", "asleep", "away", "no_frost"], "active_preset": "home", "available_schedules": [ "CV Roan", @@ -2345,7 +2345,7 @@ async def test_connect_adam_multiple_devices_per_zone(self): "lower_bound": 0.0, "upper_bound": 99.9, "resolution": 0.01, - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": ["home", "asleep", "away", "no_frost"], "active_preset": "asleep", "available_schedules": [ "CV Roan", @@ -2392,7 +2392,7 @@ async def test_connect_adam_multiple_devices_per_zone(self): "lower_bound": 0.0, "upper_bound": 99.9, "resolution": 0.01, - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": ["home", "asleep", "away", "no_frost"], "active_preset": "away", "available_schedules": [ "CV Roan", @@ -2435,7 +2435,7 @@ async def test_connect_adam_multiple_devices_per_zone(self): "lower_bound": 0.0, "upper_bound": 100.0, "resolution": 0.01, - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": ["home", "asleep", "away", "no_frost"], "active_preset": "no_frost", "available_schedules": [ "CV Roan", @@ -2540,7 +2540,7 @@ async def test_adam_plus_jip(self): "lower_bound": 0.0, "upper_bound": 99.9, "resolution": 0.01, - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": ["home", "asleep", "away", "no_frost"], "active_preset": "home", "available_schedules": ["None"], "selected_schedule": "None", @@ -2562,7 +2562,7 @@ async def test_adam_plus_jip(self): "lower_bound": 0.0, "upper_bound": 99.9, "resolution": 0.01, - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": ["home", "asleep", "away", "no_frost"], "active_preset": "no_frost", "available_schedules": ["None"], "selected_schedule": "None", @@ -2603,7 +2603,7 @@ async def test_adam_plus_jip(self): "lower_bound": 0.0, "upper_bound": 99.9, "resolution": 0.01, - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": ["home", "asleep", "away", "no_frost"], "active_preset": "home", "available_schedules": ["None"], "selected_schedule": "None", @@ -2625,7 +2625,7 @@ async def test_adam_plus_jip(self): "lower_bound": 4.0, "upper_bound": 30.0, "resolution": 0.01, - "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "preset_modes": ["home", "asleep", "away", "no_frost"], "active_preset": "home", "available_schedules": ["None"], "selected_schedule": "None", From dac249b8bef813776052562fa2ec70c1ec428cb7 Mon Sep 17 00:00:00 2001 From: Bouwe Date: Mon, 9 May 2022 13:16:44 +0200 Subject: [PATCH 3/6] Update CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8bec2c22..d7219ac68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog +# v0.18.1: Smile Adam: don't show vacation-preset, as in the Plugwise App or on the local Adam-website + # v0.18.0: Smile: add generation of cooling-schedules - Further improve typing hints: e.g. all collected measurements are now typed via TypedDicts - Implement correct generation of schedules for both heating and cooling (needs testing) From d8c16b49900727278a096f8f95cd93feead97345 Mon Sep 17 00:00:00 2001 From: Bouwe Date: Mon, 9 May 2022 13:17:19 +0200 Subject: [PATCH 4/6] Bump to v0.18.1a0 test-version --- plugwise/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index 47a5788ac..facde3721 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -1,6 +1,6 @@ """Plugwise module.""" -__version__ = "0.18.0" +__version__ = "0.18.1a0" from plugwise.smile import Smile from plugwise.stick import Stick From ea5d23f54334917d26555480b23a040d3f2a4eba Mon Sep 17 00:00:00 2001 From: Bouwe Date: Tue, 10 May 2022 10:30:10 +0200 Subject: [PATCH 5/6] Bump to v0.18.1 release-version --- plugwise/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugwise/__init__.py b/plugwise/__init__.py index facde3721..ebea7b0df 100644 --- a/plugwise/__init__.py +++ b/plugwise/__init__.py @@ -1,6 +1,6 @@ """Plugwise module.""" -__version__ = "0.18.1a0" +__version__ = "0.18.1" from plugwise.smile import Smile from plugwise.stick import Stick From b88d75aa216278c3369313beb9906711f688b86d Mon Sep 17 00:00:00 2001 From: Bouwe Date: Tue, 10 May 2022 10:31:26 +0200 Subject: [PATCH 6/6] Improve changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7219ac68..e120c957b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -# v0.18.1: Smile Adam: don't show vacation-preset, as in the Plugwise App or on the local Adam-website +# v0.18.1: Smile Adam: don't show vacation-preset, as not shown in the Plugwise App or on the local Adam-website # v0.18.0: Smile: add generation of cooling-schedules - Further improve typing hints: e.g. all collected measurements are now typed via TypedDicts