From 6abf677092e2d45d39c515c8d4fa7e1787394766 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk <11290930+bouwew@users.noreply.github.com> Date: Wed, 12 Oct 2022 14:48:09 +0200 Subject: [PATCH] Bump plugwise to v0.25.0 and adapt relevant plugwise code (#80129) --- homeassistant/components/plugwise/const.py | 4 +- homeassistant/components/plugwise/gateway.py | 4 +- .../components/plugwise/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- tests/components/plugwise/conftest.py | 15 +++++-- .../all_data.json | 31 +++++++++---- .../anna_heatpump_heating/all_data.json | 21 +++++---- .../fixtures/m_adam_cooling/all_data.json | 44 ++++++++++++------- .../fixtures/m_adam_heating/all_data.json | 22 ++++++---- .../m_anna_heatpump_cooling/all_data.json | 22 ++++++---- .../m_anna_heatpump_idle/all_data.json | 38 +++++++++------- .../fixtures/p1v3_full_option/all_data.json | 21 ++++++--- .../fixtures/stretch_v31/all_data.json | 6 +-- tests/components/plugwise/test_diagnostics.py | 31 +++++++++---- 15 files changed, 175 insertions(+), 90 deletions(-) diff --git a/homeassistant/components/plugwise/const.py b/homeassistant/components/plugwise/const.py index c2d0d75c8a0..c1f759622fa 100644 --- a/homeassistant/components/plugwise/const.py +++ b/homeassistant/components/plugwise/const.py @@ -31,8 +31,8 @@ PLATFORMS_GATEWAY: Final[list[str]] = [ Platform.SWITCH, ] ZEROCONF_MAP: Final[dict[str, str]] = { - "smile": "P1", - "smile_thermo": "Anna", + "smile": "Smile P1", + "smile_thermo": "Smile Anna", "smile_open_therm": "Adam", "stretch": "Stretch", } diff --git a/homeassistant/components/plugwise/gateway.py b/homeassistant/components/plugwise/gateway.py index 4fde6a54a4a..5d951e6f997 100644 --- a/homeassistant/components/plugwise/gateway.py +++ b/homeassistant/components/plugwise/gateway.py @@ -72,8 +72,8 @@ async def async_setup_entry_gw(hass: HomeAssistant, entry: ConfigEntry) -> bool: config_entry_id=entry.entry_id, identifiers={(DOMAIN, str(api.gateway_id))}, manufacturer="Plugwise", - name=entry.title, - model=f"Smile {api.smile_name}", + model=api.smile_model, + name=api.smile_name, sw_version=api.smile_version[0], ) diff --git a/homeassistant/components/plugwise/manifest.json b/homeassistant/components/plugwise/manifest.json index 1b17f3e49f5..f49e7b7c508 100644 --- a/homeassistant/components/plugwise/manifest.json +++ b/homeassistant/components/plugwise/manifest.json @@ -2,7 +2,7 @@ "domain": "plugwise", "name": "Plugwise", "documentation": "https://www.home-assistant.io/integrations/plugwise", - "requirements": ["plugwise==0.21.4"], + "requirements": ["plugwise==0.25.0"], "codeowners": ["@CoMPaTech", "@bouwew", "@brefra", "@frenck"], "zeroconf": ["_plugwise._tcp.local."], "config_flow": true, diff --git a/requirements_all.txt b/requirements_all.txt index e2977c1e23a..d111949e8ae 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1312,7 +1312,7 @@ plexauth==0.0.6 plexwebsocket==0.0.13 # homeassistant.components.plugwise -plugwise==0.21.4 +plugwise==0.25.0 # homeassistant.components.plum_lightpad plumlightpad==0.0.11 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index b1d0498d985..e5e6894b928 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -939,7 +939,7 @@ plexauth==0.0.6 plexwebsocket==0.0.13 # homeassistant.components.plugwise -plugwise==0.21.4 +plugwise==0.25.0 # homeassistant.components.plum_lightpad plumlightpad==0.0.11 diff --git a/tests/components/plugwise/conftest.py b/tests/components/plugwise/conftest.py index d7941f74450..aa34fc8bed6 100644 --- a/tests/components/plugwise/conftest.py +++ b/tests/components/plugwise/conftest.py @@ -63,6 +63,7 @@ def mock_smile_config_flow() -> Generator[None, MagicMock, None]: ) as smile_mock: smile = smile_mock.return_value smile.smile_hostname = "smile12345" + smile.smile_model = "Test Model" smile.smile_name = "Test Smile Name" smile.connect.return_value = True yield smile @@ -83,6 +84,7 @@ def mock_smile_adam() -> Generator[None, MagicMock, None]: smile.smile_version = "3.0.15" smile.smile_type = "thermostat" smile.smile_hostname = "smile98765" + smile.smile_model = "Gateway" smile.smile_name = "Adam" smile.connect.return_value = True @@ -108,6 +110,7 @@ def mock_smile_adam_2() -> Generator[None, MagicMock, None]: smile.smile_version = "3.6.4" smile.smile_type = "thermostat" smile.smile_hostname = "smile98765" + smile.smile_model = "Gateway" smile.smile_name = "Adam" smile.connect.return_value = True @@ -133,6 +136,7 @@ def mock_smile_adam_3() -> Generator[None, MagicMock, None]: smile.smile_version = "3.6.4" smile.smile_type = "thermostat" smile.smile_hostname = "smile98765" + smile.smile_model = "Gateway" smile.smile_name = "Adam" smile.connect.return_value = True @@ -157,7 +161,8 @@ def mock_smile_anna() -> Generator[None, MagicMock, None]: smile.smile_version = "4.0.15" smile.smile_type = "thermostat" smile.smile_hostname = "smile98765" - smile.smile_name = "Anna" + smile.smile_model = "Gateway" + smile.smile_name = "Smile Anna" smile.connect.return_value = True @@ -181,7 +186,8 @@ def mock_smile_anna_2() -> Generator[None, MagicMock, None]: smile.smile_version = "4.0.15" smile.smile_type = "thermostat" smile.smile_hostname = "smile98765" - smile.smile_name = "Anna" + smile.smile_model = "Gateway" + smile.smile_name = "Smile Anna" smile.connect.return_value = True @@ -205,7 +211,8 @@ def mock_smile_anna_3() -> Generator[None, MagicMock, None]: smile.smile_version = "4.0.15" smile.smile_type = "thermostat" smile.smile_hostname = "smile98765" - smile.smile_name = "Anna" + smile.smile_model = "Gateway" + smile.smile_name = "Smile Anna" smile.connect.return_value = True @@ -229,6 +236,7 @@ def mock_smile_p1() -> Generator[None, MagicMock, None]: smile.smile_version = "3.3.9" smile.smile_type = "power" smile.smile_hostname = "smile98765" + smile.smile_model = "Gateway" smile.smile_name = "Smile P1" smile.connect.return_value = True @@ -253,6 +261,7 @@ def mock_stretch() -> Generator[None, MagicMock, None]: smile.smile_version = "3.1.11" smile.smile_type = "stretch" smile.smile_hostname = "stretch98765" + smile.smile_model = "Gateway" smile.smile_name = "Stretch" smile.connect.return_value = True diff --git a/tests/components/plugwise/fixtures/adam_multiple_devices_per_zone/all_data.json b/tests/components/plugwise/fixtures/adam_multiple_devices_per_zone/all_data.json index 08792347af0..d62ff0e249d 100644 --- a/tests/components/plugwise/fixtures/adam_multiple_devices_per_zone/all_data.json +++ b/tests/components/plugwise/fixtures/adam_multiple_devices_per_zone/all_data.json @@ -26,7 +26,8 @@ "upper_bound": 99.9, "resolution": 0.01 }, - "preset_modes": ["home", "asleep", "away", "no_frost"], + "available": true, + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "active_preset": "away", "available_schedules": [ "CV Roan", @@ -53,6 +54,7 @@ "name": "Floor kraan", "zigbee_mac_address": "ABCD012345670A02", "vendor": "Plugwise", + "available": true, "sensors": { "temperature": 26.0, "setpoint": 21.5, @@ -69,6 +71,7 @@ "name": "Bios Cv Thermostatic Radiator ", "zigbee_mac_address": "ABCD012345670A09", "vendor": "Plugwise", + "available": true, "sensors": { "temperature": 17.2, "setpoint": 13.0, @@ -92,7 +95,8 @@ "upper_bound": 99.9, "resolution": 0.01 }, - "preset_modes": ["home", "asleep", "away", "no_frost"], + "available": true, + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "active_preset": "home", "available_schedules": [ "CV Roan", @@ -116,12 +120,11 @@ "hardware": "AME Smile 2.0 board", "location": "1f9dcf83fd4e4b66b72ff787957bfe5d", "mac_address": "012345670001", - "model": "Adam", + "model": "Gateway", "name": "Adam", "zigbee_mac_address": "ABCD012345670101", - "vendor": "Plugwise B.V.", + "vendor": "Plugwise", "regulation_mode": "heating", - "regulation_modes": [], "binary_sensors": { "plugwise_notification": true }, @@ -138,6 +141,7 @@ "name": "Thermostatic Radiator Jessie", "zigbee_mac_address": "ABCD012345670A10", "vendor": "Plugwise", + "available": true, "sensors": { "temperature": 17.1, "setpoint": 15.0, @@ -154,6 +158,7 @@ "name": "Playstation Smart Plug", "zigbee_mac_address": "ABCD012345670A12", "vendor": "Plugwise", + "available": true, "sensors": { "electricity_consumed": 82.6, "electricity_consumed_interval": 8.6, @@ -173,6 +178,7 @@ "name": "CV Pomp", "zigbee_mac_address": "ABCD012345670A05", "vendor": "Plugwise", + "available": true, "sensors": { "electricity_consumed": 35.6, "electricity_consumed_interval": 7.37, @@ -205,6 +211,7 @@ "name": "NAS", "zigbee_mac_address": "ABCD012345670A14", "vendor": "Plugwise", + "available": true, "sensors": { "electricity_consumed": 16.5, "electricity_consumed_interval": 0.5, @@ -224,6 +231,7 @@ "name": "USG Smart Plug", "zigbee_mac_address": "ABCD012345670A16", "vendor": "Plugwise", + "available": true, "sensors": { "electricity_consumed": 8.5, "electricity_consumed_interval": 0.0, @@ -243,6 +251,7 @@ "name": "NVR", "zigbee_mac_address": "ABCD012345670A15", "vendor": "Plugwise", + "available": true, "sensors": { "electricity_consumed": 34.0, "electricity_consumed_interval": 9.15, @@ -262,6 +271,7 @@ "name": "Fibaro HC2", "zigbee_mac_address": "ABCD012345670A13", "vendor": "Plugwise", + "available": true, "sensors": { "electricity_consumed": 12.5, "electricity_consumed_interval": 3.8, @@ -288,7 +298,8 @@ "upper_bound": 99.9, "resolution": 0.01 }, - "preset_modes": ["home", "asleep", "away", "no_frost"], + "available": true, + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "active_preset": "asleep", "available_schedules": [ "CV Roan", @@ -315,6 +326,7 @@ "name": "Thermostatic Radiator Badkamer", "zigbee_mac_address": "ABCD012345670A17", "vendor": "Plugwise", + "available": true, "sensors": { "temperature": 19.1, "setpoint": 14.0, @@ -338,7 +350,8 @@ "upper_bound": 99.9, "resolution": 0.01 }, - "preset_modes": ["home", "asleep", "away", "no_frost"], + "available": true, + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "active_preset": "away", "available_schedules": [ "CV Roan", @@ -364,6 +377,7 @@ "name": "Ziggo Modem", "zigbee_mac_address": "ABCD012345670A01", "vendor": "Plugwise", + "available": true, "sensors": { "electricity_consumed": 12.2, "electricity_consumed_interval": 2.97, @@ -390,7 +404,8 @@ "upper_bound": 100.0, "resolution": 0.01 }, - "preset_modes": ["home", "asleep", "away", "no_frost"], + "available": true, + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "active_preset": "no_frost", "available_schedules": [ "CV Roan", diff --git a/tests/components/plugwise/fixtures/anna_heatpump_heating/all_data.json b/tests/components/plugwise/fixtures/anna_heatpump_heating/all_data.json index 1cc94ca6347..be2dd05011b 100644 --- a/tests/components/plugwise/fixtures/anna_heatpump_heating/all_data.json +++ b/tests/components/plugwise/fixtures/anna_heatpump_heating/all_data.json @@ -1,6 +1,6 @@ [ { - "smile_name": "Smile", + "smile_name": "Smile Anna", "gateway_id": "015ae9ea3f964e668e490fa39da3870b", "heater_id": "1cbf783bb11e4a7c8a6843dee3a86927", "cooling_present": true, @@ -19,7 +19,7 @@ "upper_bound": 100.0, "resolution": 1.0 }, - "elga_cooling_enabled": true, + "available": true, "binary_sensors": { "dhw_state": false, "heating_state": true, @@ -30,6 +30,7 @@ }, "sensors": { "water_temperature": 29.1, + "dhw_temperature": 46.3, "intended_boiler_temperature": 0.0, "modulation_level": 52, "return_temperature": 25.1, @@ -46,9 +47,9 @@ "hardware": "AME Smile 2.0 board", "location": "a57efe5f145f498c9be62a9b63626fbf", "mac_address": "012345670001", - "model": "Smile", - "name": "Smile", - "vendor": "Plugwise B.V.", + "model": "Gateway", + "name": "Smile Anna", + "vendor": "Plugwise", "binary_sensors": { "plugwise_notification": false }, @@ -61,15 +62,18 @@ "firmware": "2018-02-08T11:15:53+01:00", "hardware": "6539-1301-5002", "location": "c784ee9fdab44e1395b8dee7d7a497d5", - "model": "Anna", + "model": "ThermoTouch", "name": "Anna", "vendor": "Plugwise", "thermostat": { + "setpoint_low": 20.5, + "setpoint_high": 24.0, "setpoint": 20.5, "lower_bound": 4.0, "upper_bound": 30.0, "resolution": 0.1 }, + "available": true, "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], "active_preset": "home", "available_schedules": ["standaard"], @@ -78,10 +82,11 @@ "mode": "auto", "sensors": { "temperature": 19.3, - "setpoint": 20.5, "illuminance": 86.0, "cooling_activation_outdoor_temperature": 21.0, - "cooling_deactivation_threshold": 4.0 + "cooling_deactivation_threshold": 4.0, + "setpoint_low": 20.5, + "setpoint_high": 24.0 } } } 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 1f7c82983d4..246ae5dff50 100644 --- a/tests/components/plugwise/fixtures/m_adam_cooling/all_data.json +++ b/tests/components/plugwise/fixtures/m_adam_cooling/all_data.json @@ -10,23 +10,31 @@ "ad4838d7d35c4d6ea796ee12ae5aedf8": { "dev_class": "thermostat", "location": "f2bf9048bef64cc5b6d5110154e33c81", - "model": "Anna", + "model": "ThermoTouch", "name": "Anna", - "vendor": "Plugwise B.V.", + "vendor": "Plugwise", "thermostat": { - "setpoint": 18.5, + "setpoint": 20.0, + "setpoint_low": 20.0, + "setpoint_high": 23.5, "lower_bound": 1.0, "upper_bound": 35.0, "resolution": 0.01 }, - "preset_modes": ["home", "asleep", "away", "no_frost"], + "available": true, + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "active_preset": "asleep", "available_schedules": ["Weekschema", "Badkamer", "Test"], "selected_schedule": "None", "last_used": "Weekschema", "control_state": "cooling", "mode": "cool", - "sensors": { "temperature": 18.1, "setpoint": 18.5 } + "sensors": { + "temperature": 25.8, + "setpoint": 20.0, + "setpoint_low": 20.0, + "setpoint_high": 23.5 + } }, "1772a4ea304041adb83f357b751341ff": { "dev_class": "thermo_sensor", @@ -37,6 +45,7 @@ "name": "Tom Badkamer", "zigbee_mac_address": "ABCD012345670A01", "vendor": "Plugwise", + "available": true, "sensors": { "temperature": 21.6, "battery": 99, @@ -54,12 +63,15 @@ "zigbee_mac_address": "ABCD012345670A04", "vendor": "Plugwise", "thermostat": { - "setpoint": 15.0, + "setpoint": 19.0, + "setpoint_low": 19.0, + "setpoint_high": 25.0, "lower_bound": 0.0, "upper_bound": 99.9, "resolution": 0.01 }, - "preset_modes": ["home", "asleep", "away", "no_frost"], + "available": true, + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "active_preset": "home", "available_schedules": ["Weekschema", "Badkamer", "Test"], "selected_schedule": "Badkamer", @@ -67,9 +79,11 @@ "control_state": "off", "mode": "auto", "sensors": { - "temperature": 17.9, + "temperature": 239, "battery": 56, - "setpoint": 15.0 + "setpoint": 20.0, + "setpoint_low": 20.0, + "setpoint_high": 23.5 } }, "da224107914542988a88561b4452b0f6": { @@ -78,10 +92,10 @@ "hardware": "AME Smile 2.0 board", "location": "bc93488efab249e5bc54fd7e175a6f91", "mac_address": "012345670001", - "model": "Adam", + "model": "Gateway", "name": "Adam", "zigbee_mac_address": "ABCD012345670101", - "vendor": "Plugwise B.V.", + "vendor": "Plugwise", "regulation_mode": "cooling", "regulation_modes": [ "cooling", @@ -94,7 +108,7 @@ "plugwise_notification": false }, "sensors": { - "outdoor_temperature": -1.25 + "outdoor_temperature": 29.65 } }, "056ee145a816487eaa69243c3280f8bf": { @@ -108,7 +122,7 @@ "upper_bound": 95.0, "resolution": 0.01 }, - "adam_cooling_enabled": true, + "available": true, "binary_sensors": { "cooling_state": true, "dhw_state": false, @@ -116,8 +130,8 @@ "flame_state": false }, "sensors": { - "water_temperature": 37.0, - "intended_boiler_temperature": 38.1 + "water_temperature": 19.0, + "intended_boiler_temperature": 17.5 }, "switches": { "dhw_cm_switch": false 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 0a00a5b7b1c..8ee3df544e5 100644 --- a/tests/components/plugwise/fixtures/m_adam_heating/all_data.json +++ b/tests/components/plugwise/fixtures/m_adam_heating/all_data.json @@ -10,23 +10,24 @@ "ad4838d7d35c4d6ea796ee12ae5aedf8": { "dev_class": "thermostat", "location": "f2bf9048bef64cc5b6d5110154e33c81", - "model": "Anna", + "model": "ThermoTouch", "name": "Anna", - "vendor": "Plugwise B.V.", + "vendor": "Plugwise", "thermostat": { - "setpoint": 18.5, + "setpoint": 20.0, "lower_bound": 1.0, "upper_bound": 35.0, "resolution": 0.01 }, - "preset_modes": ["home", "asleep", "away", "no_frost"], + "available": true, + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "active_preset": "asleep", "available_schedules": ["Weekschema", "Badkamer", "Test"], "selected_schedule": "None", "last_used": "Weekschema", "control_state": "heating", "mode": "heat", - "sensors": { "temperature": 18.1, "setpoint": 18.5 } + "sensors": { "temperature": 19.1, "setpoint": 20.0 } }, "1772a4ea304041adb83f357b751341ff": { "dev_class": "thermo_sensor", @@ -37,8 +38,9 @@ "name": "Tom Badkamer", "zigbee_mac_address": "ABCD012345670A01", "vendor": "Plugwise", + "available": true, "sensors": { - "temperature": 21.6, + "temperature": 18.6, "battery": 99, "temperature_difference": 2.3, "valve_position": 0.0 @@ -59,7 +61,8 @@ "upper_bound": 99.9, "resolution": 0.01 }, - "preset_modes": ["home", "asleep", "away", "no_frost"], + "available": true, + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "active_preset": "home", "available_schedules": ["Weekschema", "Badkamer", "Test"], "selected_schedule": "Badkamer", @@ -78,10 +81,10 @@ "hardware": "AME Smile 2.0 board", "location": "bc93488efab249e5bc54fd7e175a6f91", "mac_address": "012345670001", - "model": "Adam", + "model": "Gateway", "name": "Adam", "zigbee_mac_address": "ABCD012345670101", - "vendor": "Plugwise B.V.", + "vendor": "Plugwise", "regulation_mode": "heating", "regulation_modes": ["heating", "off", "bleeding_cold", "bleeding_hot"], "binary_sensors": { @@ -108,6 +111,7 @@ "upper_bound": 60.0, "resolution": 0.01 }, + "available": true, "binary_sensors": { "dhw_state": false, "heating_state": true, diff --git a/tests/components/plugwise/fixtures/m_anna_heatpump_cooling/all_data.json b/tests/components/plugwise/fixtures/m_anna_heatpump_cooling/all_data.json index a9a92126265..d6d34801641 100644 --- a/tests/components/plugwise/fixtures/m_anna_heatpump_cooling/all_data.json +++ b/tests/components/plugwise/fixtures/m_anna_heatpump_cooling/all_data.json @@ -1,6 +1,6 @@ [ { - "smile_name": "Smile", + "smile_name": "Smile Anna", "gateway_id": "015ae9ea3f964e668e490fa39da3870b", "heater_id": "1cbf783bb11e4a7c8a6843dee3a86927", "cooling_present": true, @@ -19,7 +19,7 @@ "upper_bound": 100.0, "resolution": 1.0 }, - "elga_cooling_enabled": true, + "available": true, "binary_sensors": { "dhw_state": false, "heating_state": false, @@ -30,6 +30,7 @@ }, "sensors": { "water_temperature": 29.1, + "dhw_temperature": 46.3, "intended_boiler_temperature": 0.0, "modulation_level": 52, "return_temperature": 25.1, @@ -46,9 +47,9 @@ "hardware": "AME Smile 2.0 board", "location": "a57efe5f145f498c9be62a9b63626fbf", "mac_address": "012345670001", - "model": "Smile", - "name": "Smile", - "vendor": "Plugwise B.V.", + "model": "Gateway", + "name": "Smile Anna", + "vendor": "Plugwise", "binary_sensors": { "plugwise_notification": false }, @@ -61,15 +62,18 @@ "firmware": "2018-02-08T11:15:53+01:00", "hardware": "6539-1301-5002", "location": "c784ee9fdab44e1395b8dee7d7a497d5", - "model": "Anna", + "model": "ThermoTouch", "name": "Anna", "vendor": "Plugwise", "thermostat": { "setpoint": 24.0, + "setpoint_low": 20.5, + "setpoint_high": 24.0, "lower_bound": 4.0, "upper_bound": 30.0, "resolution": 0.1 }, + "available": true, "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], "active_preset": "home", "available_schedules": ["standaard"], @@ -78,10 +82,12 @@ "mode": "auto", "sensors": { "temperature": 26.3, - "setpoint": 24.0, "illuminance": 86.0, "cooling_activation_outdoor_temperature": 21.0, - "cooling_deactivation_threshold": 4.0 + "cooling_deactivation_threshold": 4.0, + "setpoint": 24.0, + "setpoint_low": 20.5, + "setpoint_high": 24.0 } } } diff --git a/tests/components/plugwise/fixtures/m_anna_heatpump_idle/all_data.json b/tests/components/plugwise/fixtures/m_anna_heatpump_idle/all_data.json index 0c1fef1a171..ca9559ca073 100644 --- a/tests/components/plugwise/fixtures/m_anna_heatpump_idle/all_data.json +++ b/tests/components/plugwise/fixtures/m_anna_heatpump_idle/all_data.json @@ -1,6 +1,6 @@ [ { - "smile_name": "Smile", + "smile_name": "Smile Anna", "gateway_id": "015ae9ea3f964e668e490fa39da3870b", "heater_id": "1cbf783bb11e4a7c8a6843dee3a86927", "cooling_present": true, @@ -19,7 +19,7 @@ "upper_bound": 100.0, "resolution": 1.0 }, - "elga_cooling_enabled": true, + "available": true, "binary_sensors": { "dhw_state": false, "heating_state": false, @@ -29,12 +29,13 @@ "flame_state": false }, "sensors": { - "water_temperature": 29.1, - "intended_boiler_temperature": 0.0, - "modulation_level": 52, - "return_temperature": 25.1, + "water_temperature": 19.1, + "dhw_temperature": 46.3, + "intended_boiler_temperature": 18.0, + "modulation_level": 0, + "return_temperature": 22.0, "water_pressure": 1.57, - "outdoor_air_temperature": 3.0 + "outdoor_air_temperature": 28.2 }, "switches": { "dhw_cm_switch": false @@ -46,14 +47,14 @@ "hardware": "AME Smile 2.0 board", "location": "a57efe5f145f498c9be62a9b63626fbf", "mac_address": "012345670001", - "model": "Smile", - "name": "Smile", - "vendor": "Plugwise B.V.", + "model": "Gateway", + "name": "Smile Anna", + "vendor": "Plugwise", "binary_sensors": { "plugwise_notification": false }, "sensors": { - "outdoor_temperature": 20.2 + "outdoor_temperature": 28.2 } }, "3cb70739631c4d17a86b8b12e8a5161b": { @@ -61,15 +62,18 @@ "firmware": "2018-02-08T11:15:53+01:00", "hardware": "6539-1301-5002", "location": "c784ee9fdab44e1395b8dee7d7a497d5", - "model": "Anna", + "model": "ThermoTouch", "name": "Anna", "vendor": "Plugwise", "thermostat": { "setpoint": 20.5, + "setpoint_low": 20.5, + "setpoint_high": 24.0, "lower_bound": 4.0, "upper_bound": 30.0, "resolution": 0.1 }, + "available": true, "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], "active_preset": "home", "available_schedules": ["standaard"], @@ -77,11 +81,13 @@ "last_used": "standaard", "mode": "auto", "sensors": { - "temperature": 21.3, - "setpoint": 20.5, + "temperature": 23.0, "illuminance": 86.0, - "cooling_activation_outdoor_temperature": 21.0, - "cooling_deactivation_threshold": 4.0 + "cooling_activation_outdoor_temperature": 25.0, + "cooling_deactivation_threshold": 4.0, + "setpoint": 20.5, + "setpoint_low": 20.5, + "setpoint_high": 24.0 } } } diff --git a/tests/components/plugwise/fixtures/p1v3_full_option/all_data.json b/tests/components/plugwise/fixtures/p1v3_full_option/all_data.json index fbf5aa63a5f..c52f33e6323 100644 --- a/tests/components/plugwise/fixtures/p1v3_full_option/all_data.json +++ b/tests/components/plugwise/fixtures/p1v3_full_option/all_data.json @@ -1,19 +1,30 @@ [ { - "smile_name": "P1", - "gateway_id": "e950c7d5e1ee407a858e2a8b5016c8b3", + "smile_name": "Smile P1", + "gateway_id": "cd3e822288064775a7c4afcdd70bdda2", "notifications": {} }, { - "e950c7d5e1ee407a858e2a8b5016c8b3": { + "cd3e822288064775a7c4afcdd70bdda2": { "dev_class": "gateway", "firmware": "3.3.9", "hardware": "AME Smile 2.0 board", "location": "cd3e822288064775a7c4afcdd70bdda2", "mac_address": "012345670001", - "model": "P1", + "model": "Gateway", + "name": "Smile P1", + "vendor": "Plugwise", + "binary_sensors": { + "plugwise_notification": false + } + }, + "e950c7d5e1ee407a858e2a8b5016c8b3": { + "dev_class": "smartmeter", + "location": "cd3e822288064775a7c4afcdd70bdda2", + "model": "2M550E-1012", "name": "P1", - "vendor": "Plugwise B.V.", + "vendor": "ISKRAEMECO", + "available": true, "sensors": { "net_electricity_point": -2816, "electricity_consumed_peak_point": 0, diff --git a/tests/components/plugwise/fixtures/stretch_v31/all_data.json b/tests/components/plugwise/fixtures/stretch_v31/all_data.json index 1ff62e9e619..1ce34e376d7 100644 --- a/tests/components/plugwise/fixtures/stretch_v31/all_data.json +++ b/tests/components/plugwise/fixtures/stretch_v31/all_data.json @@ -10,10 +10,10 @@ "firmware": "3.1.11", "location": "0000aaaa0000aaaa0000aaaa0000aa00", "mac_address": "01:23:45:67:89:AB", - "model": "Stretch", + "model": "Gateway", "name": "Stretch", - "vendor": "Plugwise B.V.", - "zigbee_mac_address": "ABCD012345670101" + "zigbee_mac_address": "ABCD012345670101", + "vendor": "Plugwise" }, "5871317346d045bc9f6b987ef25ee638": { "dev_class": "water_heater_vessel", diff --git a/tests/components/plugwise/test_diagnostics.py b/tests/components/plugwise/test_diagnostics.py index 3e3b2259e15..7e8d574d5bd 100644 --- a/tests/components/plugwise/test_diagnostics.py +++ b/tests/components/plugwise/test_diagnostics.py @@ -46,7 +46,8 @@ async def test_diagnostics( "upper_bound": 99.9, "resolution": 0.01, }, - "preset_modes": ["home", "asleep", "away", "no_frost"], + "available": True, + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "active_preset": "away", "available_schedules": [ "CV Roan", @@ -69,6 +70,7 @@ async def test_diagnostics( "name": "Floor kraan", "zigbee_mac_address": "ABCD012345670A02", "vendor": "Plugwise", + "available": True, "sensors": { "temperature": 26.0, "setpoint": 21.5, @@ -85,6 +87,7 @@ async def test_diagnostics( "name": "Bios Cv Thermostatic Radiator ", "zigbee_mac_address": "ABCD012345670A09", "vendor": "Plugwise", + "available": True, "sensors": { "temperature": 17.2, "setpoint": 13.0, @@ -108,7 +111,8 @@ async def test_diagnostics( "upper_bound": 99.9, "resolution": 0.01, }, - "preset_modes": ["home", "asleep", "away", "no_frost"], + "available": True, + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "active_preset": "home", "available_schedules": [ "CV Roan", @@ -128,12 +132,11 @@ async def test_diagnostics( "hardware": "AME Smile 2.0 board", "location": "1f9dcf83fd4e4b66b72ff787957bfe5d", "mac_address": "012345670001", - "model": "Adam", + "model": "Gateway", "name": "Adam", "zigbee_mac_address": "ABCD012345670101", - "vendor": "Plugwise B.V.", + "vendor": "Plugwise", "regulation_mode": "heating", - "regulation_modes": [], "binary_sensors": {"plugwise_notification": True}, "sensors": {"outdoor_temperature": 7.81}, }, @@ -146,6 +149,7 @@ async def test_diagnostics( "name": "Thermostatic Radiator Jessie", "zigbee_mac_address": "ABCD012345670A10", "vendor": "Plugwise", + "available": True, "sensors": { "temperature": 17.1, "setpoint": 15.0, @@ -162,6 +166,7 @@ async def test_diagnostics( "name": "Playstation Smart Plug", "zigbee_mac_address": "ABCD012345670A12", "vendor": "Plugwise", + "available": True, "sensors": { "electricity_consumed": 82.6, "electricity_consumed_interval": 8.6, @@ -178,6 +183,7 @@ async def test_diagnostics( "name": "CV Pomp", "zigbee_mac_address": "ABCD012345670A05", "vendor": "Plugwise", + "available": True, "sensors": { "electricity_consumed": 35.6, "electricity_consumed_interval": 7.37, @@ -206,6 +212,7 @@ async def test_diagnostics( "name": "NAS", "zigbee_mac_address": "ABCD012345670A14", "vendor": "Plugwise", + "available": True, "sensors": { "electricity_consumed": 16.5, "electricity_consumed_interval": 0.5, @@ -222,6 +229,7 @@ async def test_diagnostics( "name": "USG Smart Plug", "zigbee_mac_address": "ABCD012345670A16", "vendor": "Plugwise", + "available": True, "sensors": { "electricity_consumed": 8.5, "electricity_consumed_interval": 0.0, @@ -238,6 +246,7 @@ async def test_diagnostics( "name": "NVR", "zigbee_mac_address": "ABCD012345670A15", "vendor": "Plugwise", + "available": True, "sensors": { "electricity_consumed": 34.0, "electricity_consumed_interval": 9.15, @@ -254,6 +263,7 @@ async def test_diagnostics( "name": "Fibaro HC2", "zigbee_mac_address": "ABCD012345670A13", "vendor": "Plugwise", + "available": True, "sensors": { "electricity_consumed": 12.5, "electricity_consumed_interval": 3.8, @@ -277,7 +287,8 @@ async def test_diagnostics( "upper_bound": 99.9, "resolution": 0.01, }, - "preset_modes": ["home", "asleep", "away", "no_frost"], + "available": True, + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "active_preset": "asleep", "available_schedules": [ "CV Roan", @@ -300,6 +311,7 @@ async def test_diagnostics( "name": "Thermostatic Radiator Badkamer", "zigbee_mac_address": "ABCD012345670A17", "vendor": "Plugwise", + "available": True, "sensors": { "temperature": 19.1, "setpoint": 14.0, @@ -323,7 +335,8 @@ async def test_diagnostics( "upper_bound": 99.9, "resolution": 0.01, }, - "preset_modes": ["home", "asleep", "away", "no_frost"], + "available": True, + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "active_preset": "away", "available_schedules": [ "CV Roan", @@ -345,6 +358,7 @@ async def test_diagnostics( "name": "Ziggo Modem", "zigbee_mac_address": "ABCD012345670A01", "vendor": "Plugwise", + "available": True, "sensors": { "electricity_consumed": 12.2, "electricity_consumed_interval": 2.97, @@ -368,7 +382,8 @@ async def test_diagnostics( "upper_bound": 100.0, "resolution": 0.01, }, - "preset_modes": ["home", "asleep", "away", "no_frost"], + "available": True, + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], "active_preset": "no_frost", "available_schedules": [ "CV Roan",