Skip to content

Commit

Permalink
Merge pull request #186 from plugwise/no_vacation_preset
Browse files Browse the repository at this point in the history
Remove vacation-preset for Adam
  • Loading branch information
bouwew committed May 10, 2022
2 parents 5aab073 + b88d75a commit 640c7f4
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 19 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog

# 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
- Implement correct generation of schedules for both heating and cooling (needs testing)
Expand Down
2 changes: 1 addition & 1 deletion plugwise/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Plugwise module."""

__version__ = "0.18.0"
__version__ = "0.18.1"

from plugwise.smile import Smile
from plugwise.stick import Stick
7 changes: 6 additions & 1 deletion plugwise/smile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 17 additions & 17 deletions tests/test_smile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit 640c7f4

Please sign in to comment.