From b034d6d0a12331dffeb02d4398b350575498a543 Mon Sep 17 00:00:00 2001
From: Bouwe Westerdijk <11290930+bouwew@users.noreply.github.com>
Date: Sun, 14 Jan 2024 11:25:45 +0100
Subject: [PATCH] Bump plugwise to v0.36.2 (#108012)

---
 .../components/plugwise/manifest.json         |  2 +-
 requirements_all.txt                          |  2 +-
 requirements_test_all.txt                     |  2 +-
 tests/components/plugwise/conftest.py         |  2 +-
 .../fixtures/m_adam_cooling/all_data.json     | 52 +++++++++-----
 .../fixtures/m_adam_cooling/device_list.json  |  2 +-
 .../fixtures/m_adam_heating/all_data.json     | 69 ++++++++-----------
 .../fixtures/m_adam_heating/device_list.json  |  2 +-
 .../{adam_jip => m_adam_jip}/all_data.json    |  4 +-
 .../{adam_jip => m_adam_jip}/device_list.json |  0
 .../notifications.json                        |  0
 11 files changed, 72 insertions(+), 65 deletions(-)
 rename tests/components/plugwise/fixtures/{adam_jip => m_adam_jip}/all_data.json (98%)
 rename tests/components/plugwise/fixtures/{adam_jip => m_adam_jip}/device_list.json (100%)
 rename tests/components/plugwise/fixtures/{adam_jip => m_adam_jip}/notifications.json (100%)

diff --git a/homeassistant/components/plugwise/manifest.json b/homeassistant/components/plugwise/manifest.json
index 92923e98d2c..3476360082a 100644
--- a/homeassistant/components/plugwise/manifest.json
+++ b/homeassistant/components/plugwise/manifest.json
@@ -7,6 +7,6 @@
   "integration_type": "hub",
   "iot_class": "local_polling",
   "loggers": ["crcmod", "plugwise"],
-  "requirements": ["plugwise==0.35.3"],
+  "requirements": ["plugwise==0.36.2"],
   "zeroconf": ["_plugwise._tcp.local."]
 }
diff --git a/requirements_all.txt b/requirements_all.txt
index 3858efa640a..e9d0901fb1d 100644
--- a/requirements_all.txt
+++ b/requirements_all.txt
@@ -1505,7 +1505,7 @@ plexauth==0.0.6
 plexwebsocket==0.0.14
 
 # homeassistant.components.plugwise
-plugwise==0.35.3
+plugwise==0.36.2
 
 # homeassistant.components.plum_lightpad
 plumlightpad==0.0.11
diff --git a/requirements_test_all.txt b/requirements_test_all.txt
index ded65914e01..b5f161e54d2 100644
--- a/requirements_test_all.txt
+++ b/requirements_test_all.txt
@@ -1164,7 +1164,7 @@ plexauth==0.0.6
 plexwebsocket==0.0.14
 
 # homeassistant.components.plugwise
-plugwise==0.35.3
+plugwise==0.36.2
 
 # homeassistant.components.plum_lightpad
 plumlightpad==0.0.11
diff --git a/tests/components/plugwise/conftest.py b/tests/components/plugwise/conftest.py
index a97d312cd54..4d81956eacb 100644
--- a/tests/components/plugwise/conftest.py
+++ b/tests/components/plugwise/conftest.py
@@ -159,7 +159,7 @@ def mock_smile_adam_3() -> Generator[None, MagicMock, None]:
 @pytest.fixture
 def mock_smile_adam_4() -> Generator[None, MagicMock, None]:
     """Create a 4th Mock Adam environment for testing exceptions."""
-    chosen_env = "adam_jip"
+    chosen_env = "m_adam_jip"
 
     with patch(
         "homeassistant.components.plugwise.coordinator.Smile", autospec=True
diff --git a/tests/components/plugwise/fixtures/m_adam_cooling/all_data.json b/tests/components/plugwise/fixtures/m_adam_cooling/all_data.json
index 7b570a6cf61..d9bf85b4701 100644
--- a/tests/components/plugwise/fixtures/m_adam_cooling/all_data.json
+++ b/tests/components/plugwise/fixtures/m_adam_cooling/all_data.json
@@ -13,7 +13,7 @@
       "maximum_boiler_temperature": {
         "lower_bound": 25.0,
         "resolution": 0.01,
-        "setpoint": 60.0,
+        "setpoint": 50.0,
         "upper_bound": 95.0
       },
       "model": "Generic heater",
@@ -37,8 +37,8 @@
       "sensors": {
         "battery": 99,
         "temperature": 21.6,
-        "temperature_difference": 2.3,
-        "valve_position": 0.0
+        "temperature_difference": -0.2,
+        "valve_position": 100
       },
       "temperature_offset": {
         "lower_bound": -2.0,
@@ -47,19 +47,25 @@
         "upper_bound": 2.0
       },
       "vendor": "Plugwise",
-      "zigbee_mac_address": "ABCD012345670A01"
+      "zigbee_mac_address": "000D6F000C8FF5EE"
     },
     "ad4838d7d35c4d6ea796ee12ae5aedf8": {
-      "active_preset": "asleep",
+      "active_preset": "home",
       "available": true,
-      "available_schedules": ["Weekschema", "Badkamer", "Test", "off"],
+      "available_schedules": [
+        "Badkamer",
+        "Test",
+        "Vakantie",
+        "Weekschema",
+        "off"
+      ],
       "control_state": "cooling",
       "dev_class": "thermostat",
       "location": "f2bf9048bef64cc5b6d5110154e33c81",
       "mode": "cool",
       "model": "ThermoTouch",
       "name": "Anna",
-      "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
+      "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"],
       "select_schedule": "Weekschema",
       "selected_schedule": "None",
       "sensors": {
@@ -79,31 +85,39 @@
         "plugwise_notification": false
       },
       "dev_class": "gateway",
-      "firmware": "3.6.4",
+      "firmware": "3.7.8",
+      "gateway_modes": ["away", "full", "vacation"],
       "hardware": "AME Smile 2.0 board",
       "location": "bc93488efab249e5bc54fd7e175a6f91",
-      "mac_address": "012345670001",
+      "mac_address": "012345679891",
       "model": "Gateway",
       "name": "Adam",
       "regulation_modes": [
-        "heating",
-        "off",
-        "bleeding_cold",
         "bleeding_hot",
+        "bleeding_cold",
+        "off",
+        "heating",
         "cooling"
       ],
+      "select_gateway_mode": "full",
       "select_regulation_mode": "cooling",
       "sensors": {
         "outdoor_temperature": 29.65
       },
       "vendor": "Plugwise",
-      "zigbee_mac_address": "ABCD012345670101"
+      "zigbee_mac_address": "000D6F000D5A168D"
     },
     "e2f4322d57924fa090fbbc48b3a140dc": {
       "active_preset": "home",
       "available": true,
-      "available_schedules": ["Weekschema", "Badkamer", "Test", "off"],
-      "control_state": "off",
+      "available_schedules": [
+        "Badkamer",
+        "Test",
+        "Vakantie",
+        "Weekschema",
+        "off"
+      ],
+      "control_state": "preheating",
       "dev_class": "zone_thermostat",
       "firmware": "2016-10-10T02:00:00+02:00",
       "hardware": "255",
@@ -111,10 +125,10 @@
       "mode": "auto",
       "model": "Lisa",
       "name": "Lisa Badkamer",
-      "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
+      "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"],
       "select_schedule": "Badkamer",
       "sensors": {
-        "battery": 56,
+        "battery": 38,
         "setpoint": 23.5,
         "temperature": 23.9
       },
@@ -131,7 +145,7 @@
         "upper_bound": 99.9
       },
       "vendor": "Plugwise",
-      "zigbee_mac_address": "ABCD012345670A04"
+      "zigbee_mac_address": "000D6F000C869B61"
     },
     "e8ef2a01ed3b4139a53bf749204fe6b4": {
       "dev_class": "switching",
@@ -150,7 +164,7 @@
     "cooling_present": true,
     "gateway_id": "da224107914542988a88561b4452b0f6",
     "heater_id": "056ee145a816487eaa69243c3280f8bf",
-    "item_count": 145,
+    "item_count": 147,
     "notifications": {},
     "smile_name": "Adam"
   }
diff --git a/tests/components/plugwise/fixtures/m_adam_cooling/device_list.json b/tests/components/plugwise/fixtures/m_adam_cooling/device_list.json
index f78b4cd38a9..35fe367eb34 100644
--- a/tests/components/plugwise/fixtures/m_adam_cooling/device_list.json
+++ b/tests/components/plugwise/fixtures/m_adam_cooling/device_list.json
@@ -1,8 +1,8 @@
 [
   "da224107914542988a88561b4452b0f6",
   "056ee145a816487eaa69243c3280f8bf",
+  "e2f4322d57924fa090fbbc48b3a140dc",
   "ad4838d7d35c4d6ea796ee12ae5aedf8",
   "1772a4ea304041adb83f357b751341ff",
-  "e2f4322d57924fa090fbbc48b3a140dc",
   "e8ef2a01ed3b4139a53bf749204fe6b4"
 ]
diff --git a/tests/components/plugwise/fixtures/m_adam_heating/all_data.json b/tests/components/plugwise/fixtures/m_adam_heating/all_data.json
index 57259047698..37fc73009d3 100644
--- a/tests/components/plugwise/fixtures/m_adam_heating/all_data.json
+++ b/tests/components/plugwise/fixtures/m_adam_heating/all_data.json
@@ -1,28 +1,5 @@
 {
   "devices": {
-    "01234567890abcdefghijklmnopqrstu": {
-      "available": false,
-      "dev_class": "thermo_sensor",
-      "firmware": "2020-11-04T01:00:00+01:00",
-      "hardware": "1",
-      "location": "f871b8c4d63549319221e294e4f88074",
-      "model": "Tom/Floor",
-      "name": "Tom Badkamer",
-      "sensors": {
-        "battery": 99,
-        "temperature": 18.6,
-        "temperature_difference": 2.3,
-        "valve_position": 0.0
-      },
-      "temperature_offset": {
-        "lower_bound": -2.0,
-        "resolution": 0.1,
-        "setpoint": 0.1,
-        "upper_bound": 2.0
-      },
-      "vendor": "Plugwise",
-      "zigbee_mac_address": "ABCD012345670A01"
-    },
     "056ee145a816487eaa69243c3280f8bf": {
       "available": true,
       "binary_sensors": {
@@ -41,7 +18,7 @@
       "maximum_boiler_temperature": {
         "lower_bound": 25.0,
         "resolution": 0.01,
-        "setpoint": 60.0,
+        "setpoint": 50.0,
         "upper_bound": 95.0
       },
       "model": "Generic heater",
@@ -65,8 +42,8 @@
       "sensors": {
         "battery": 99,
         "temperature": 18.6,
-        "temperature_difference": 2.3,
-        "valve_position": 0.0
+        "temperature_difference": -0.2,
+        "valve_position": 100
       },
       "temperature_offset": {
         "lower_bound": -2.0,
@@ -75,19 +52,25 @@
         "upper_bound": 2.0
       },
       "vendor": "Plugwise",
-      "zigbee_mac_address": "ABCD012345670A01"
+      "zigbee_mac_address": "000D6F000C8FF5EE"
     },
     "ad4838d7d35c4d6ea796ee12ae5aedf8": {
-      "active_preset": "asleep",
+      "active_preset": "home",
       "available": true,
-      "available_schedules": ["Weekschema", "Badkamer", "Test", "off"],
+      "available_schedules": [
+        "Badkamer",
+        "Test",
+        "Vakantie",
+        "Weekschema",
+        "off"
+      ],
       "control_state": "preheating",
       "dev_class": "thermostat",
       "location": "f2bf9048bef64cc5b6d5110154e33c81",
       "mode": "heat",
       "model": "ThermoTouch",
       "name": "Anna",
-      "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
+      "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"],
       "select_schedule": "Weekschema",
       "selected_schedule": "None",
       "sensors": {
@@ -107,24 +90,32 @@
         "plugwise_notification": false
       },
       "dev_class": "gateway",
-      "firmware": "3.6.4",
+      "firmware": "3.7.8",
+      "gateway_modes": ["away", "full", "vacation"],
       "hardware": "AME Smile 2.0 board",
       "location": "bc93488efab249e5bc54fd7e175a6f91",
-      "mac_address": "012345670001",
+      "mac_address": "012345679891",
       "model": "Gateway",
       "name": "Adam",
-      "regulation_modes": ["heating", "off", "bleeding_cold", "bleeding_hot"],
+      "regulation_modes": ["bleeding_hot", "bleeding_cold", "off", "heating"],
+      "select_gateway_mode": "full",
       "select_regulation_mode": "heating",
       "sensors": {
         "outdoor_temperature": -1.25
       },
       "vendor": "Plugwise",
-      "zigbee_mac_address": "ABCD012345670101"
+      "zigbee_mac_address": "000D6F000D5A168D"
     },
     "e2f4322d57924fa090fbbc48b3a140dc": {
       "active_preset": "home",
       "available": true,
-      "available_schedules": ["Weekschema", "Badkamer", "Test", "off"],
+      "available_schedules": [
+        "Badkamer",
+        "Test",
+        "Vakantie",
+        "Weekschema",
+        "off"
+      ],
       "control_state": "off",
       "dev_class": "zone_thermostat",
       "firmware": "2016-10-10T02:00:00+02:00",
@@ -133,10 +124,10 @@
       "mode": "auto",
       "model": "Lisa",
       "name": "Lisa Badkamer",
-      "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"],
+      "preset_modes": ["no_frost", "asleep", "vacation", "home", "away"],
       "select_schedule": "Badkamer",
       "sensors": {
-        "battery": 56,
+        "battery": 38,
         "setpoint": 15.0,
         "temperature": 17.9
       },
@@ -153,7 +144,7 @@
         "upper_bound": 99.9
       },
       "vendor": "Plugwise",
-      "zigbee_mac_address": "ABCD012345670A04"
+      "zigbee_mac_address": "000D6F000C869B61"
     },
     "e8ef2a01ed3b4139a53bf749204fe6b4": {
       "dev_class": "switching",
@@ -172,7 +163,7 @@
     "cooling_present": false,
     "gateway_id": "da224107914542988a88561b4452b0f6",
     "heater_id": "056ee145a816487eaa69243c3280f8bf",
-    "item_count": 145,
+    "item_count": 147,
     "notifications": {},
     "smile_name": "Adam"
   }
diff --git a/tests/components/plugwise/fixtures/m_adam_heating/device_list.json b/tests/components/plugwise/fixtures/m_adam_heating/device_list.json
index f78b4cd38a9..35fe367eb34 100644
--- a/tests/components/plugwise/fixtures/m_adam_heating/device_list.json
+++ b/tests/components/plugwise/fixtures/m_adam_heating/device_list.json
@@ -1,8 +1,8 @@
 [
   "da224107914542988a88561b4452b0f6",
   "056ee145a816487eaa69243c3280f8bf",
+  "e2f4322d57924fa090fbbc48b3a140dc",
   "ad4838d7d35c4d6ea796ee12ae5aedf8",
   "1772a4ea304041adb83f357b751341ff",
-  "e2f4322d57924fa090fbbc48b3a140dc",
   "e8ef2a01ed3b4139a53bf749204fe6b4"
 ]
diff --git a/tests/components/plugwise/fixtures/adam_jip/all_data.json b/tests/components/plugwise/fixtures/m_adam_jip/all_data.json
similarity index 98%
rename from tests/components/plugwise/fixtures/adam_jip/all_data.json
rename to tests/components/plugwise/fixtures/m_adam_jip/all_data.json
index 37566e1d39e..915f438c105 100644
--- a/tests/components/plugwise/fixtures/adam_jip/all_data.json
+++ b/tests/components/plugwise/fixtures/m_adam_jip/all_data.json
@@ -193,12 +193,14 @@
       },
       "dev_class": "gateway",
       "firmware": "3.2.8",
+      "gateway_modes": ["away", "full", "vacation"],
       "hardware": "AME Smile 2.0 board",
       "location": "9e4433a9d69f40b3aefd15e74395eaec",
       "mac_address": "012345670001",
       "model": "Gateway",
       "name": "Adam",
       "regulation_modes": ["heating", "off", "bleeding_cold", "bleeding_hot"],
+      "select_gateway_mode": "full",
       "select_regulation_mode": "heating",
       "sensors": {
         "outdoor_temperature": 24.9
@@ -304,7 +306,7 @@
     "cooling_present": false,
     "gateway_id": "b5c2386c6f6342669e50fe49dd05b188",
     "heater_id": "e4684553153b44afbef2200885f379dc",
-    "item_count": 219,
+    "item_count": 221,
     "notifications": {},
     "smile_name": "Adam"
   }
diff --git a/tests/components/plugwise/fixtures/adam_jip/device_list.json b/tests/components/plugwise/fixtures/m_adam_jip/device_list.json
similarity index 100%
rename from tests/components/plugwise/fixtures/adam_jip/device_list.json
rename to tests/components/plugwise/fixtures/m_adam_jip/device_list.json
diff --git a/tests/components/plugwise/fixtures/adam_jip/notifications.json b/tests/components/plugwise/fixtures/m_adam_jip/notifications.json
similarity index 100%
rename from tests/components/plugwise/fixtures/adam_jip/notifications.json
rename to tests/components/plugwise/fixtures/m_adam_jip/notifications.json
-- 
GitLab