Skip to content

Commit 4323b7f

Browse files
authored
Merge pull request #549 from plugwise/pauze
Implement feature request #523, fix Core Issue #104433
2 parents aa0d7f3 + 00c67d8 commit 4323b7f

File tree

15 files changed

+112
-67
lines changed

15 files changed

+112
-67
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22

33
## Versions from 0.40 and up
44

5-
## Ongoing
5+
## v0.46.0
66

7+
- New Feature: for Adam, add the gateway_mode Select. This allows the user to set the Gateway Mode, options: Normal, Pause, Vacation.
8+
Implemented via [plugwise v0.36.1](https://github.com/plugwise/python-plugwise/releases/tag/v0.36.1)
9+
- Remove support for Adam with fw 2.x and Anna with fw 3.x, via [plugwise v0.35.4](https://github.com/plugwise/python-plugwise/releases/tag/v0.35.4).
10+
- Fix [Core Issue #104433](https://github.com/home-assistant/core/issues/104433) via [plugwise v0.35.3](https://github.com/plugwise/python-plugwise/releases/tag/v0.35.3)
711
- Implement [Core PR #104004](https://github.com/home-assistant/core/pull/104004)
812
- Implement [Core PR #104324](https://github.com/home-assistant/core/pull/104324)
913

custom_components/plugwise/const.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,13 @@
7272

7373
SelectType = Literal[
7474
"select_dhw_mode",
75+
"select_gateway_mode",
7576
"select_regulation_mode",
7677
"select_schedule",
7778
]
7879
SelectOptionsType = Literal[
7980
"dhw_modes",
81+
"gateway_modes",
8082
"regulation_modes",
8183
"available_schedules",
8284
]

custom_components/plugwise/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
"integration_type": "hub",
99
"iot_class": "local_polling",
1010
"loggers": ["plugwise"],
11-
"requirements": ["plugwise==0.35.3"],
12-
"version": "0.45.1"
11+
"requirements": ["plugwise==0.36.1"],
12+
"version": "0.46.0"
1313
}

custom_components/plugwise/select.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ class PlugwiseSelectEntityDescription(SelectEntityDescription):
5050
command=lambda api, loc, opt: api.set_regulation_mode(opt),
5151
options_key="regulation_modes",
5252
),
53+
PlugwiseSelectEntityDescription(
54+
key="select_gateway_mode",
55+
translation_key="gateway_mode",
56+
icon="mdi:cog-outline",
57+
entity_category=EntityCategory.CONFIG,
58+
command=lambda api, loc, opt: api.set_gateway_mode(opt),
59+
options_key="gateway_modes",
60+
),
5361
PlugwiseSelectEntityDescription(
5462
key="select_dhw_mode",
5563
translation_key="dhw_mode",

custom_components/plugwise/strings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,14 @@
118118
"off": "Off"
119119
}
120120
},
121+
"gateway_mode": {
122+
"name": "Gateway mode",
123+
"state": {
124+
"away": "Pause",
125+
"full": "Normal",
126+
"vacation": "Vacation"
127+
}
128+
},
121129
"thermostat_schedule": {
122130
"name": "Thermostat schedule",
123131
"state": {

custom_components/plugwise/translations/en.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,14 @@
118118
"off": "Off"
119119
}
120120
},
121+
"gateway_mode": {
122+
"name": "Gateway mode",
123+
"state": {
124+
"away": "Pause",
125+
"full": "Normal",
126+
"vacation": "Vacation"
127+
}
128+
},
121129
"thermostat_schedule": {
122130
"name": "Thermostat schedule",
123131
"state": {

custom_components/plugwise/translations/nl.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,14 @@
118118
"off": "Uit"
119119
}
120120
},
121+
"gateway_mode": {
122+
"name": "Gateway mode",
123+
"state": {
124+
"away": "Pauze",
125+
"full": "Normaal",
126+
"vacation": "Vakantie"
127+
}
128+
},
121129
"thermostat_schedule": {
122130
"name": "Thermostaatschema",
123131
"state": {

tests/components/plugwise/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def mock_smile_adam_3() -> Generator[None, MagicMock, None]:
162162
@pytest.fixture
163163
def mock_smile_adam_4() -> Generator[None, MagicMock, None]:
164164
"""Create a 4th Mock Adam environment for testing exceptions."""
165-
chosen_env = "adam_jip"
165+
chosen_env = "m_adam_jip"
166166

167167
with patch(
168168
"homeassistant.components.plugwise.coordinator.Smile", autospec=True

tests/components/plugwise/fixtures/m_adam_cooling/all_data.json

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
"binary_sensors": {
66
"cooling_state": true,
77
"dhw_state": false,
8-
"flame_state": false,
8+
"flame_state": true,
99
"heating_state": false
1010
},
1111
"dev_class": "heater_central",
1212
"location": "bc93488efab249e5bc54fd7e175a6f91",
1313
"maximum_boiler_temperature": {
1414
"lower_bound": 25.0,
1515
"resolution": 0.01,
16-
"setpoint": 60.0,
16+
"setpoint": 50.0,
1717
"upper_bound": 95.0
1818
},
1919
"model": "Generic heater",
@@ -37,8 +37,8 @@
3737
"sensors": {
3838
"battery": 99,
3939
"temperature": 21.6,
40-
"temperature_difference": 2.3,
41-
"valve_position": 0.0
40+
"temperature_difference": -0.2,
41+
"valve_position": 100
4242
},
4343
"temperature_offset": {
4444
"lower_bound": -2.0,
@@ -47,19 +47,25 @@
4747
"upper_bound": 2.0
4848
},
4949
"vendor": "Plugwise",
50-
"zigbee_mac_address": "ABCD012345670A01"
50+
"zigbee_mac_address": "000D6F000C8FF5EE"
5151
},
5252
"ad4838d7d35c4d6ea796ee12ae5aedf8": {
53-
"active_preset": "asleep",
53+
"active_preset": "home",
5454
"available": true,
55-
"available_schedules": ["Weekschema", "Badkamer", "Test", "off"],
55+
"available_schedules": [
56+
"Badkamer",
57+
"Test",
58+
"Vakantie",
59+
"Weekschema",
60+
"off"
61+
],
5662
"control_state": "cooling",
5763
"dev_class": "thermostat",
5864
"location": "f2bf9048bef64cc5b6d5110154e33c81",
5965
"mode": "cool",
6066
"model": "ThermoTouch",
6167
"name": "Anna",
62-
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
68+
"preset_modes": ["no_frost", "asleep", "vacation", "home", "away"],
6369
"select_schedule": "Weekschema",
6470
"selected_schedule": "None",
6571
"sensors": {
@@ -79,42 +85,50 @@
7985
"plugwise_notification": false
8086
},
8187
"dev_class": "gateway",
82-
"firmware": "3.6.4",
88+
"firmware": "3.7.8",
89+
"gateway_modes": ["away", "full", "vacation"],
8390
"hardware": "AME Smile 2.0 board",
8491
"location": "bc93488efab249e5bc54fd7e175a6f91",
85-
"mac_address": "012345670001",
92+
"mac_address": "012345679891",
8693
"model": "Gateway",
8794
"name": "Adam",
8895
"regulation_modes": [
89-
"heating",
90-
"off",
91-
"bleeding_cold",
9296
"bleeding_hot",
97+
"bleeding_cold",
98+
"off",
99+
"heating",
93100
"cooling"
94101
],
102+
"select_gateway_mode": "full",
95103
"select_regulation_mode": "cooling",
96104
"sensors": {
97105
"outdoor_temperature": 29.65
98106
},
99107
"vendor": "Plugwise",
100-
"zigbee_mac_address": "ABCD012345670101"
108+
"zigbee_mac_address": "000D6F000D5A168D"
101109
},
102110
"e2f4322d57924fa090fbbc48b3a140dc": {
103111
"active_preset": "home",
104112
"available": true,
105-
"available_schedules": ["Weekschema", "Badkamer", "Test", "off"],
106-
"control_state": "off",
113+
"available_schedules": [
114+
"Badkamer",
115+
"Test",
116+
"Vakantie",
117+
"Weekschema",
118+
"off"
119+
],
120+
"control_state": "preheating",
107121
"dev_class": "zone_thermostat",
108122
"firmware": "2016-10-10T02:00:00+02:00",
109123
"hardware": "255",
110124
"location": "f871b8c4d63549319221e294e4f88074",
111125
"mode": "auto",
112126
"model": "Lisa",
113127
"name": "Lisa Badkamer",
114-
"preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
128+
"preset_modes": ["no_frost", "asleep", "vacation", "home", "away"],
115129
"select_schedule": "Badkamer",
116130
"sensors": {
117-
"battery": 56,
131+
"battery": 38,
118132
"setpoint": 23.5,
119133
"temperature": 23.9
120134
},
@@ -131,7 +145,7 @@
131145
"upper_bound": 99.9
132146
},
133147
"vendor": "Plugwise",
134-
"zigbee_mac_address": "ABCD012345670A04"
148+
"zigbee_mac_address": "000D6F000C869B61"
135149
},
136150
"e8ef2a01ed3b4139a53bf749204fe6b4": {
137151
"dev_class": "switching",
@@ -150,7 +164,7 @@
150164
"cooling_present": true,
151165
"gateway_id": "da224107914542988a88561b4452b0f6",
152166
"heater_id": "056ee145a816487eaa69243c3280f8bf",
153-
"item_count": 145,
167+
"item_count": 147,
154168
"notifications": {},
155169
"smile_name": "Adam"
156170
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
22
"da224107914542988a88561b4452b0f6",
33
"056ee145a816487eaa69243c3280f8bf",
4+
"e2f4322d57924fa090fbbc48b3a140dc",
45
"ad4838d7d35c4d6ea796ee12ae5aedf8",
56
"1772a4ea304041adb83f357b751341ff",
6-
"e2f4322d57924fa090fbbc48b3a140dc",
77
"e8ef2a01ed3b4139a53bf749204fe6b4"
88
]

0 commit comments

Comments
 (0)