diff --git a/homeassistant/components/plugwise/manifest.json b/homeassistant/components/plugwise/manifest.json index b7a28b4563c..383a5232c58 100644 --- a/homeassistant/components/plugwise/manifest.json +++ b/homeassistant/components/plugwise/manifest.json @@ -8,6 +8,6 @@ "iot_class": "local_polling", "loggers": ["plugwise"], "quality_scale": "platinum", - "requirements": ["plugwise==1.10.0"], + "requirements": ["plugwise==1.11.0"], "zeroconf": ["_plugwise._tcp.local."] } diff --git a/requirements_all.txt b/requirements_all.txt index b7642e01257..8eb841338b0 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1745,7 +1745,7 @@ plexauth==0.0.6 plexwebsocket==0.0.14 # homeassistant.components.plugwise -plugwise==1.10.0 +plugwise==1.11.0 # homeassistant.components.serial_pm pmsensor==0.4 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 5b6f928755f..6e6aa837522 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1497,7 +1497,7 @@ plexauth==0.0.6 plexwebsocket==0.0.14 # homeassistant.components.plugwise -plugwise==1.10.0 +plugwise==1.11.0 # homeassistant.components.poolsense poolsense==0.0.8 diff --git a/tests/components/plugwise/fixtures/m_adam_cooling/data.json b/tests/components/plugwise/fixtures/m_adam_cooling/data.json index fdd52b1efe3..9b95475ebb6 100644 --- a/tests/components/plugwise/fixtures/m_adam_cooling/data.json +++ b/tests/components/plugwise/fixtures/m_adam_cooling/data.json @@ -91,6 +91,21 @@ }, "vendor": "Plugwise" }, + "c9293d1d68ee48fc8843c6f0dee2b6be": { + "dev_class": "pumping", + "members": [ + "854f8a9b0e7e425db97f1f110e1ce4b3", + "ad4838d7d35c4d6ea796ee12ae5aedf8" + ], + "model": "Group", + "name": "Vloerverwarming", + "sensors": { + "electricity_consumed": 45.0, + "electricity_produced": 0.0, + "temperature": 20.1 + }, + "vendor": "Plugwise" + }, "da224107914542988a88561b4452b0f6": { "binary_sensors": { "plugwise_notification": false @@ -173,8 +188,12 @@ "2568cc4b9c1e401495d4741a5f89bee1", "29542b2b6a6a4169acecc15c72a599b8" ], - "model": "Switchgroup", + "model": "Group", "name": "Test", + "sensors": { + "electricity_consumed": 16.5, + "electricity_produced": 0.0 + }, "switches": { "relay": true }, diff --git a/tests/components/plugwise/fixtures/m_adam_heating/data.json b/tests/components/plugwise/fixtures/m_adam_heating/data.json index 2f3951c0c6b..47a8fdeb2b6 100644 --- a/tests/components/plugwise/fixtures/m_adam_heating/data.json +++ b/tests/components/plugwise/fixtures/m_adam_heating/data.json @@ -96,6 +96,21 @@ }, "vendor": "Plugwise" }, + "c9293d1d68ee48fc8843c6f0dee2b6be": { + "dev_class": "pumping", + "members": [ + "854f8a9b0e7e425db97f1f110e1ce4b3", + "ad4838d7d35c4d6ea796ee12ae5aedf8" + ], + "model": "Group", + "name": "Vloerverwarming", + "sensors": { + "electricity_consumed": 45.0, + "electricity_produced": 0.0, + "temperature": 20.1 + }, + "vendor": "Plugwise" + }, "da224107914542988a88561b4452b0f6": { "binary_sensors": { "plugwise_notification": false @@ -172,8 +187,12 @@ "2568cc4b9c1e401495d4741a5f89bee1", "29542b2b6a6a4169acecc15c72a599b8" ], - "model": "Switchgroup", + "model": "Group", "name": "Test", + "sensors": { + "electricity_consumed": 16.5, + "electricity_produced": 0.0 + }, "switches": { "relay": true }, diff --git a/tests/components/plugwise/fixtures/m_adam_multiple_devices_per_zone/data.json b/tests/components/plugwise/fixtures/m_adam_multiple_devices_per_zone/data.json index f1880ba69e1..126031795a8 100644 --- a/tests/components/plugwise/fixtures/m_adam_multiple_devices_per_zone/data.json +++ b/tests/components/plugwise/fixtures/m_adam_multiple_devices_per_zone/data.json @@ -505,6 +505,20 @@ "vendor": "Plugwise", "zigbee_mac_address": "ABCD012345670A06" }, + "e117db6848394c8cb70d9c28e63d92d2": { + "dev_class": "pumping", + "members": [ + "78d1126fc4c743db81b61c20e88342a7", + "b59bcebaf94b499ea7d46e4a66fb62d8" + ], + "model": "Group", + "name": "Vloerverwarming Woonkamer", + "sensors": { + "electricity_consumed": 35.6, + "temperature": 20.9 + }, + "vendor": "Plugwise" + }, "e7693eb9582644e5b865dba8d4447cf1": { "available": true, "binary_sensors": { @@ -539,8 +553,12 @@ "02cf28bfec924855854c544690a609ef", "4a810418d5394b3f82727340b91ba740" ], - "model": "Switchgroup", + "model": "Group", "name": "Test", + "sensors": { + "electricity_consumed": 14.8, + "electricity_produced": 0.0 + }, "switches": { "relay": true }, diff --git a/tests/components/plugwise/fixtures/stretch_v31/data.json b/tests/components/plugwise/fixtures/stretch_v31/data.json index 250839d08a8..9927b5c1391 100644 --- a/tests/components/plugwise/fixtures/stretch_v31/data.json +++ b/tests/components/plugwise/fixtures/stretch_v31/data.json @@ -91,7 +91,7 @@ "059e4d03c7a34d278add5c7a4a781d19", "cfe95cf3de1948c0b8955125bf754614" ], - "model": "Switchgroup", + "model": "Group", "name": "Schakel", "switches": { "relay": true @@ -107,7 +107,7 @@ "cfe95cf3de1948c0b8955125bf754614", "e1c884e7dede431dadee09506ec4f859" ], - "model": "Switchgroup", + "model": "Group", "name": "Stroomvreters", "switches": { "relay": true diff --git a/tests/components/plugwise/snapshots/test_diagnostics.ambr b/tests/components/plugwise/snapshots/test_diagnostics.ambr index 91411c323ac..9fe05968147 100644 --- a/tests/components/plugwise/snapshots/test_diagnostics.ambr +++ b/tests/components/plugwise/snapshots/test_diagnostics.ambr @@ -554,6 +554,20 @@ 'vendor': 'Plugwise', 'zigbee_mac_address': 'ABCD012345670A06', }), + 'e117db6848394c8cb70d9c28e63d92d2': dict({ + 'dev_class': 'pumping', + 'members': list([ + '78d1126fc4c743db81b61c20e88342a7', + 'b59bcebaf94b499ea7d46e4a66fb62d8', + ]), + 'model': 'Group', + 'name': 'Vloerverwarming Woonkamer', + 'sensors': dict({ + 'electricity_consumed': 35.6, + 'temperature': 20.9, + }), + 'vendor': 'Plugwise', + }), 'e7693eb9582644e5b865dba8d4447cf1': dict({ 'available': True, 'binary_sensors': dict({ @@ -588,8 +602,12 @@ '02cf28bfec924855854c544690a609ef', '4a810418d5394b3f82727340b91ba740', ]), - 'model': 'Switchgroup', + 'model': 'Group', 'name': 'Test', + 'sensors': dict({ + 'electricity_consumed': 14.8, + 'electricity_produced': 0.0, + }), 'switches': dict({ 'relay': True, }), diff --git a/tests/components/plugwise/snapshots/test_sensor.ambr b/tests/components/plugwise/snapshots/test_sensor.ambr index 7c7715dfd28..113fba03b15 100644 --- a/tests/components/plugwise/snapshots/test_sensor.ambr +++ b/tests/components/plugwise/snapshots/test_sensor.ambr @@ -1216,6 +1216,118 @@ 'state': '37.0', }) # --- +# name: test_adam_sensor_snapshot[platforms0-False-m_adam_heating][sensor.test_electricity_consumed-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.test_electricity_consumed', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Electricity consumed', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'electricity_consumed', + 'unique_id': 'e8ef2a01ed3b4139a53bf749204fe6b4-electricity_consumed', + 'unit_of_measurement': , + }) +# --- +# name: test_adam_sensor_snapshot[platforms0-False-m_adam_heating][sensor.test_electricity_consumed-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'power', + 'friendly_name': 'Test Electricity consumed', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.test_electricity_consumed', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '16.5', + }) +# --- +# name: test_adam_sensor_snapshot[platforms0-False-m_adam_heating][sensor.test_electricity_produced-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.test_electricity_produced', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Electricity produced', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'electricity_produced', + 'unique_id': 'e8ef2a01ed3b4139a53bf749204fe6b4-electricity_produced', + 'unit_of_measurement': , + }) +# --- +# name: test_adam_sensor_snapshot[platforms0-False-m_adam_heating][sensor.test_electricity_produced-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'power', + 'friendly_name': 'Test Electricity produced', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.test_electricity_produced', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.0', + }) +# --- # name: test_adam_sensor_snapshot[platforms0-False-m_adam_heating][sensor.tom_badkamer_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -1489,6 +1601,174 @@ 'state': '100.0', }) # --- +# name: test_adam_sensor_snapshot[platforms0-False-m_adam_heating][sensor.vloerverwarming_electricity_consumed-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.vloerverwarming_electricity_consumed', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Electricity consumed', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'electricity_consumed', + 'unique_id': 'c9293d1d68ee48fc8843c6f0dee2b6be-electricity_consumed', + 'unit_of_measurement': , + }) +# --- +# name: test_adam_sensor_snapshot[platforms0-False-m_adam_heating][sensor.vloerverwarming_electricity_consumed-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'power', + 'friendly_name': 'Vloerverwarming Electricity consumed', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.vloerverwarming_electricity_consumed', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '45.0', + }) +# --- +# name: test_adam_sensor_snapshot[platforms0-False-m_adam_heating][sensor.vloerverwarming_electricity_produced-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.vloerverwarming_electricity_produced', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Electricity produced', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'electricity_produced', + 'unique_id': 'c9293d1d68ee48fc8843c6f0dee2b6be-electricity_produced', + 'unit_of_measurement': , + }) +# --- +# name: test_adam_sensor_snapshot[platforms0-False-m_adam_heating][sensor.vloerverwarming_electricity_produced-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'power', + 'friendly_name': 'Vloerverwarming Electricity produced', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.vloerverwarming_electricity_produced', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.0', + }) +# --- +# name: test_adam_sensor_snapshot[platforms0-False-m_adam_heating][sensor.vloerverwarming_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.vloerverwarming_temperature', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 1, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Temperature', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'c9293d1d68ee48fc8843c6f0dee2b6be-temperature', + 'unit_of_measurement': , + }) +# --- +# name: test_adam_sensor_snapshot[platforms0-False-m_adam_heating][sensor.vloerverwarming_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'Vloerverwarming Temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.vloerverwarming_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '20.1', + }) +# --- # name: test_anna_p1_sensor_snapshot[platforms0][sensor.anna_illuminance-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/plugwise/test_init.py b/tests/components/plugwise/test_init.py index 906703767e2..18640c6f6c1 100644 --- a/tests/components/plugwise/test_init.py +++ b/tests/components/plugwise/test_init.py @@ -257,7 +257,7 @@ async def test_update_device( entity_registry, mock_config_entry.entry_id ) ) - == 51 + == 56 ) assert ( len( @@ -265,7 +265,7 @@ async def test_update_device( device_registry, mock_config_entry.entry_id ) ) - == 10 + == 11 ) # Add a 2nd Tom/Floor @@ -289,7 +289,7 @@ async def test_update_device( entity_registry, mock_config_entry.entry_id ) ) - == 58 + == 63 ) assert ( len( @@ -297,7 +297,7 @@ async def test_update_device( device_registry, mock_config_entry.entry_id ) ) - == 11 + == 12 ) item_list: list[str] = [] for device_entry in list(device_registry.devices.values()): @@ -320,7 +320,7 @@ async def test_update_device( entity_registry, mock_config_entry.entry_id ) ) - == 51 + == 56 ) assert ( len( @@ -328,7 +328,7 @@ async def test_update_device( device_registry, mock_config_entry.entry_id ) ) - == 10 + == 11 ) item_list: list[str] = [] for device_entry in list(device_registry.devices.values()):