From 568ed2f0f67e4bf22037b0fd2059960d2949dd83 Mon Sep 17 00:00:00 2001 From: Bouwe Westerdijk <11290930+bouwew@users.noreply.github.com> Date: Fri, 7 Nov 2025 11:19:50 +0100 Subject: [PATCH] Add support for Plugwise Anna P1 (#155916) --- .../components/plugwise/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- tests/components/plugwise/conftest.py | 28 + .../plugwise/fixtures/anna_p1/data.json | 104 ++ .../fixtures/m_anna_heatpump_idle/data.json | 97 -- .../plugwise/snapshots/test_climate.ambr | 165 +- .../plugwise/snapshots/test_sensor.ambr | 1501 +++++++++++++++++ tests/components/plugwise/test_climate.py | 8 +- tests/components/plugwise/test_sensor.py | 13 + 10 files changed, 1734 insertions(+), 188 deletions(-) create mode 100644 tests/components/plugwise/fixtures/anna_p1/data.json delete mode 100644 tests/components/plugwise/fixtures/m_anna_heatpump_idle/data.json diff --git a/homeassistant/components/plugwise/manifest.json b/homeassistant/components/plugwise/manifest.json index 01eff3984ad..96e941b7acc 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.8.3"], + "requirements": ["plugwise==1.9.0"], "zeroconf": ["_plugwise._tcp.local."] } diff --git a/requirements_all.txt b/requirements_all.txt index 268f8467e96..bb688b88661 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1719,7 +1719,7 @@ plexauth==0.0.6 plexwebsocket==0.0.14 # homeassistant.components.plugwise -plugwise==1.8.3 +plugwise==1.9.0 # homeassistant.components.serial_pm pmsensor==0.4 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index db2b13b4875..f8d3d35bcb2 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1456,7 +1456,7 @@ plexauth==0.0.6 plexwebsocket==0.0.14 # homeassistant.components.plugwise -plugwise==1.8.3 +plugwise==1.9.0 # homeassistant.components.poolsense poolsense==0.0.8 diff --git a/tests/components/plugwise/conftest.py b/tests/components/plugwise/conftest.py index 7120e0f87f0..eb9f02a2812 100644 --- a/tests/components/plugwise/conftest.py +++ b/tests/components/plugwise/conftest.py @@ -270,6 +270,34 @@ def mock_smile_anna(chosen_env: str, cooling_present: bool) -> Generator[MagicMo yield api +@pytest.fixture +def mock_smile_anna_p1() -> Generator[MagicMock]: + """Create a Mock Anna-P1 type for testing.""" + chosen_env = "anna_p1" + data = _read_json(chosen_env, "data") + with patch( + "homeassistant.components.plugwise.coordinator.Smile", autospec=True + ) as api_mock: + api = api_mock.return_value + + api.async_update.return_value = data + api.connect.return_value = Version("4.4.4") + api.cooling_present = False + api.gateway_id = "53130847be2f436cb946b78dedb9053a" + api.heater_id = "36b937e44ad145bab165fa0fe99d742d" + api.reboot = True + api.smile = build_smile( + hostname="smile98765", + model="Gateway", + model_id="smile_thermo", + name="Smile Anna P1", + type="thermostat", + version="4.4.4", + ) + + yield api + + @pytest.fixture def mock_smile_p1(chosen_env: str, gateway_id: str) -> Generator[MagicMock]: """Create a base Mock P1 type for testing with different datasets and gateway-ids.""" diff --git a/tests/components/plugwise/fixtures/anna_p1/data.json b/tests/components/plugwise/fixtures/anna_p1/data.json new file mode 100644 index 00000000000..fd0bc91fb3a --- /dev/null +++ b/tests/components/plugwise/fixtures/anna_p1/data.json @@ -0,0 +1,104 @@ +{ + "1e5e55b958ac445583602f767cb45942": { + "active_preset": "home", + "available_schedules": ["Thermostat schedule", "off"], + "climate_mode": "heat", + "control_state": "idle", + "dev_class": "thermostat", + "firmware": "2018-02-08T11:15:53+01:00", + "hardware": "6539-1301-500", + "location": "5b13651d79c4454684fd268850b1bff8", + "model": "ThermoTouch", + "name": "Anna", + "preset_modes": ["home", "asleep", "away", "vacation", "no_frost"], + "select_schedule": "off", + "sensors": { + "illuminance": 2.0, + "setpoint": 19.0, + "temperature": 19.4 + }, + "temperature_offset": { + "lower_bound": -2.0, + "resolution": 0.1, + "setpoint": 0.0, + "upper_bound": 2.0 + }, + "thermostat": { + "lower_bound": 4.0, + "resolution": 0.1, + "setpoint": 19.0, + "upper_bound": 30.0 + }, + "vendor": "Plugwise" + }, + "36b937e44ad145bab165fa0fe99d742d": { + "available": true, + "binary_sensors": { + "dhw_state": false, + "flame_state": false, + "heating_state": false + }, + "dev_class": "heater_central", + "location": "da7be222ab3b420c927f3e49fade0304", + "model": "Generic heater", + "model_id": "HR24", + "name": "OpenTherm", + "sensors": { + "intended_boiler_temperature": 0.0, + "modulation_level": 0.0, + "water_pressure": 6.0, + "water_temperature": 35.0 + }, + "switches": { + "dhw_cm_switch": true + }, + "vendor": "Intergas" + }, + "53130847be2f436cb946b78dedb9053a": { + "binary_sensors": { + "plugwise_notification": false + }, + "dev_class": "gateway", + "firmware": "4.4.4", + "hardware": "AME Smile 2.0 board", + "location": "da7be222ab3b420c927f3e49fade0304", + "mac_address": "C493000ABCD", + "model": "Gateway", + "model_id": "smile_thermo", + "name": "Smile Anna P1", + "notifications": {}, + "sensors": { + "outdoor_temperature": 11.8 + }, + "vendor": "Plugwise" + }, + "da7be222ab3b420c927f3e49fade0304": { + "available": true, + "dev_class": "smartmeter", + "location": "da7be222ab3b420c927f3e49fade0304", + "model": "2MS212 SMR5.5", + "name": "P1", + "sensors": { + "electricity_consumed_off_peak_cumulative": 618.001, + "electricity_consumed_off_peak_interval": 7, + "electricity_consumed_off_peak_point": 393, + "electricity_consumed_peak_cumulative": 576.014, + "electricity_consumed_peak_interval": 0, + "electricity_consumed_peak_point": 0, + "electricity_phase_one_consumed": 393, + "electricity_phase_one_produced": 0, + "electricity_produced_off_peak_cumulative": 246.504, + "electricity_produced_off_peak_interval": 0, + "electricity_produced_off_peak_point": 0, + "electricity_produced_peak_cumulative": 709.442, + "electricity_produced_peak_interval": 0, + "electricity_produced_peak_point": 0, + "gas_consumed_cumulative": 25.37, + "gas_consumed_interval": 0.01, + "net_electricity_cumulative": 238.069, + "net_electricity_point": 393, + "voltage_phase_one": 234.6 + }, + "vendor": "SAGEM" + } +} diff --git a/tests/components/plugwise/fixtures/m_anna_heatpump_idle/data.json b/tests/components/plugwise/fixtures/m_anna_heatpump_idle/data.json deleted file mode 100644 index 5a1cdebd380..00000000000 --- a/tests/components/plugwise/fixtures/m_anna_heatpump_idle/data.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "015ae9ea3f964e668e490fa39da3870b": { - "binary_sensors": { - "plugwise_notification": false - }, - "dev_class": "gateway", - "firmware": "4.0.15", - "hardware": "AME Smile 2.0 board", - "location": "a57efe5f145f498c9be62a9b63626fbf", - "mac_address": "012345670001", - "model": "Gateway", - "model_id": "smile_thermo", - "name": "Smile Anna", - "notifications": {}, - "sensors": { - "outdoor_temperature": 28.2 - }, - "vendor": "Plugwise" - }, - "1cbf783bb11e4a7c8a6843dee3a86927": { - "available": true, - "binary_sensors": { - "compressor_state": false, - "cooling_enabled": true, - "cooling_state": false, - "dhw_state": false, - "flame_state": false, - "heating_state": false, - "secondary_boiler_state": false - }, - "dev_class": "heater_central", - "location": "a57efe5f145f498c9be62a9b63626fbf", - "max_dhw_temperature": { - "lower_bound": 35.0, - "resolution": 0.01, - "setpoint": 53.0, - "upper_bound": 60.0 - }, - "maximum_boiler_temperature": { - "lower_bound": 0.0, - "resolution": 1.0, - "setpoint": 60.0, - "upper_bound": 100.0 - }, - "model": "Generic heater/cooler", - "name": "OpenTherm", - "sensors": { - "dhw_temperature": 46.3, - "intended_boiler_temperature": 18.0, - "modulation_level": 0, - "outdoor_air_temperature": 28.2, - "return_temperature": 22.0, - "water_pressure": 1.57, - "water_temperature": 19.1 - }, - "switches": { - "dhw_cm_switch": false - }, - "vendor": "Techneco" - }, - "3cb70739631c4d17a86b8b12e8a5161b": { - "active_preset": "home", - "available_schedules": ["standaard", "off"], - "climate_mode": "auto", - "control_state": "idle", - "dev_class": "thermostat", - "firmware": "2018-02-08T11:15:53+01:00", - "hardware": "6539-1301-5002", - "location": "c784ee9fdab44e1395b8dee7d7a497d5", - "model": "ThermoTouch", - "name": "Anna", - "preset_modes": ["no_frost", "home", "away", "asleep", "vacation"], - "select_schedule": "standaard", - "sensors": { - "cooling_activation_outdoor_temperature": 25.0, - "cooling_deactivation_threshold": 4.0, - "illuminance": 86.0, - "setpoint_high": 30.0, - "setpoint_low": 20.5, - "temperature": 23.0 - }, - "temperature_offset": { - "lower_bound": -2.0, - "resolution": 0.1, - "setpoint": -0.5, - "upper_bound": 2.0 - }, - "thermostat": { - "lower_bound": 4.0, - "resolution": 0.1, - "setpoint_high": 30.0, - "setpoint_low": 20.5, - "upper_bound": 30.0 - }, - "vendor": "Plugwise" - } -} diff --git a/tests/components/plugwise/snapshots/test_climate.ambr b/tests/components/plugwise/snapshots/test_climate.ambr index 0edb29fabda..3d72fbd5b58 100644 --- a/tests/components/plugwise/snapshots/test_climate.ambr +++ b/tests/components/plugwise/snapshots/test_climate.ambr @@ -658,89 +658,6 @@ 'state': 'auto', }) # --- -# name: test_anna_3_climate_snapshot[platforms0-True-m_anna_heatpump_idle][climate.anna-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': dict({ - 'hvac_modes': list([ - , - , - ]), - 'max_temp': 30.0, - 'min_temp': 4.0, - 'preset_modes': list([ - 'no_frost', - 'home', - 'away', - 'asleep', - 'vacation', - ]), - 'target_temp_step': 0.1, - }), - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'climate', - 'entity_category': None, - 'entity_id': 'climate.anna', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': None, - 'original_name': None, - 'platform': 'plugwise', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': , - 'translation_key': 'plugwise', - 'unique_id': '3cb70739631c4d17a86b8b12e8a5161b-climate', - 'unit_of_measurement': None, - }) -# --- -# name: test_anna_3_climate_snapshot[platforms0-True-m_anna_heatpump_idle][climate.anna-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'current_temperature': 23.0, - 'friendly_name': 'Anna', - 'hvac_action': , - 'hvac_modes': list([ - , - , - ]), - 'max_temp': 30.0, - 'min_temp': 4.0, - 'preset_mode': 'home', - 'preset_modes': list([ - 'no_frost', - 'home', - 'away', - 'asleep', - 'vacation', - ]), - 'supported_features': , - 'target_temp_high': 30.0, - 'target_temp_low': 20.5, - 'target_temp_step': 0.1, - }), - 'context': , - 'entity_id': 'climate.anna', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'auto', - }) -# --- # name: test_anna_climate_snapshot[platforms0-True-anna_heatpump_heating][climate.anna-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -824,3 +741,85 @@ 'state': 'auto', }) # --- +# name: test_anna_p1_climate_snapshot[platforms0][climate.anna-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'hvac_modes': list([ + , + , + ]), + 'max_temp': 30.0, + 'min_temp': 4.0, + 'preset_modes': list([ + 'home', + 'asleep', + 'away', + 'vacation', + 'no_frost', + ]), + 'target_temp_step': 0.1, + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'climate', + 'entity_category': None, + 'entity_id': 'climate.anna', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': , + 'translation_key': 'plugwise', + 'unique_id': '1e5e55b958ac445583602f767cb45942-climate', + 'unit_of_measurement': None, + }) +# --- +# name: test_anna_p1_climate_snapshot[platforms0][climate.anna-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'current_temperature': 19.4, + 'friendly_name': 'Anna', + 'hvac_action': , + 'hvac_modes': list([ + , + , + ]), + 'max_temp': 30.0, + 'min_temp': 4.0, + 'preset_mode': 'home', + 'preset_modes': list([ + 'home', + 'asleep', + 'away', + 'vacation', + 'no_frost', + ]), + 'supported_features': , + 'target_temp_step': 0.1, + 'temperature': 19.0, + }), + 'context': , + 'entity_id': 'climate.anna', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'heat', + }) +# --- diff --git a/tests/components/plugwise/snapshots/test_sensor.ambr b/tests/components/plugwise/snapshots/test_sensor.ambr index 962493c98ce..5a67b320966 100644 --- a/tests/components/plugwise/snapshots/test_sensor.ambr +++ b/tests/components/plugwise/snapshots/test_sensor.ambr @@ -4263,6 +4263,1507 @@ 'state': '17.2', }) # --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.anna_illuminance-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': , + 'entity_id': 'sensor.anna_illuminance', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Illuminance', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '1e5e55b958ac445583602f767cb45942-illuminance', + 'unit_of_measurement': 'lx', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.anna_illuminance-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'illuminance', + 'friendly_name': 'Anna Illuminance', + 'state_class': , + 'unit_of_measurement': 'lx', + }), + 'context': , + 'entity_id': 'sensor.anna_illuminance', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2.0', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.anna_setpoint-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': , + 'entity_id': 'sensor.anna_setpoint', + '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': 'Setpoint', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'setpoint', + 'unique_id': '1e5e55b958ac445583602f767cb45942-setpoint', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.anna_setpoint-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'Anna Setpoint', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.anna_setpoint', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '19.0', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.anna_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': , + 'entity_id': 'sensor.anna_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': '1e5e55b958ac445583602f767cb45942-temperature', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.anna_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'Anna Temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.anna_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '19.4', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.opentherm_intended_boiler_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': , + 'entity_id': 'sensor.opentherm_intended_boiler_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': 'Intended boiler temperature', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'intended_boiler_temperature', + 'unique_id': '36b937e44ad145bab165fa0fe99d742d-intended_boiler_temperature', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.opentherm_intended_boiler_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'OpenTherm Intended boiler temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.opentherm_intended_boiler_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.0', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.opentherm_modulation_level-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': , + 'entity_id': 'sensor.opentherm_modulation_level', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Modulation level', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'modulation_level', + 'unique_id': '36b937e44ad145bab165fa0fe99d742d-modulation_level', + 'unit_of_measurement': '%', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.opentherm_modulation_level-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'OpenTherm Modulation level', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.opentherm_modulation_level', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.0', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.opentherm_water_pressure-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': , + 'entity_id': 'sensor.opentherm_water_pressure', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Water pressure', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'water_pressure', + 'unique_id': '36b937e44ad145bab165fa0fe99d742d-water_pressure', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.opentherm_water_pressure-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'pressure', + 'friendly_name': 'OpenTherm Water pressure', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.opentherm_water_pressure', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '6.0', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.opentherm_water_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': , + 'entity_id': 'sensor.opentherm_water_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': 'Water temperature', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'water_temperature', + 'unique_id': '36b937e44ad145bab165fa0fe99d742d-water_temperature', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.opentherm_water_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'OpenTherm Water temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.opentherm_water_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '35.0', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_consumed_off_peak_cumulative-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.p1_electricity_consumed_off_peak_cumulative', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Electricity consumed off-peak cumulative', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'electricity_consumed_off_peak_cumulative', + 'unique_id': 'da7be222ab3b420c927f3e49fade0304-electricity_consumed_off_peak_cumulative', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_consumed_off_peak_cumulative-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'P1 Electricity consumed off-peak cumulative', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.p1_electricity_consumed_off_peak_cumulative', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '618.001', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_consumed_off_peak_interval-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.p1_electricity_consumed_off_peak_interval', + '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 off-peak interval', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'electricity_consumed_off_peak_interval', + 'unique_id': 'da7be222ab3b420c927f3e49fade0304-electricity_consumed_off_peak_interval', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_consumed_off_peak_interval-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'P1 Electricity consumed off-peak interval', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.p1_electricity_consumed_off_peak_interval', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '7', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_consumed_off_peak_point-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.p1_electricity_consumed_off_peak_point', + '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 off-peak point', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'electricity_consumed_off_peak_point', + 'unique_id': 'da7be222ab3b420c927f3e49fade0304-electricity_consumed_off_peak_point', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_consumed_off_peak_point-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'power', + 'friendly_name': 'P1 Electricity consumed off-peak point', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.p1_electricity_consumed_off_peak_point', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '393', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_consumed_peak_cumulative-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.p1_electricity_consumed_peak_cumulative', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Electricity consumed peak cumulative', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'electricity_consumed_peak_cumulative', + 'unique_id': 'da7be222ab3b420c927f3e49fade0304-electricity_consumed_peak_cumulative', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_consumed_peak_cumulative-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'P1 Electricity consumed peak cumulative', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.p1_electricity_consumed_peak_cumulative', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '576.014', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_consumed_peak_interval-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.p1_electricity_consumed_peak_interval', + '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 peak interval', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'electricity_consumed_peak_interval', + 'unique_id': 'da7be222ab3b420c927f3e49fade0304-electricity_consumed_peak_interval', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_consumed_peak_interval-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'P1 Electricity consumed peak interval', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.p1_electricity_consumed_peak_interval', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_consumed_peak_point-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.p1_electricity_consumed_peak_point', + '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 peak point', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'electricity_consumed_peak_point', + 'unique_id': 'da7be222ab3b420c927f3e49fade0304-electricity_consumed_peak_point', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_consumed_peak_point-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'power', + 'friendly_name': 'P1 Electricity consumed peak point', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.p1_electricity_consumed_peak_point', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_phase_one_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.p1_electricity_phase_one_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 phase one consumed', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'electricity_phase_one_consumed', + 'unique_id': 'da7be222ab3b420c927f3e49fade0304-electricity_phase_one_consumed', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_phase_one_consumed-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'power', + 'friendly_name': 'P1 Electricity phase one consumed', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.p1_electricity_phase_one_consumed', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '393', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_phase_one_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.p1_electricity_phase_one_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 phase one produced', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'electricity_phase_one_produced', + 'unique_id': 'da7be222ab3b420c927f3e49fade0304-electricity_phase_one_produced', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_phase_one_produced-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'power', + 'friendly_name': 'P1 Electricity phase one produced', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.p1_electricity_phase_one_produced', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_produced_off_peak_cumulative-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.p1_electricity_produced_off_peak_cumulative', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Electricity produced off-peak cumulative', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'electricity_produced_off_peak_cumulative', + 'unique_id': 'da7be222ab3b420c927f3e49fade0304-electricity_produced_off_peak_cumulative', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_produced_off_peak_cumulative-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'P1 Electricity produced off-peak cumulative', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.p1_electricity_produced_off_peak_cumulative', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '246.504', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_produced_off_peak_interval-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.p1_electricity_produced_off_peak_interval', + '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 off-peak interval', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'electricity_produced_off_peak_interval', + 'unique_id': 'da7be222ab3b420c927f3e49fade0304-electricity_produced_off_peak_interval', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_produced_off_peak_interval-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'P1 Electricity produced off-peak interval', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.p1_electricity_produced_off_peak_interval', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_produced_off_peak_point-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.p1_electricity_produced_off_peak_point', + '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 off-peak point', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'electricity_produced_off_peak_point', + 'unique_id': 'da7be222ab3b420c927f3e49fade0304-electricity_produced_off_peak_point', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_produced_off_peak_point-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'power', + 'friendly_name': 'P1 Electricity produced off-peak point', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.p1_electricity_produced_off_peak_point', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_produced_peak_cumulative-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.p1_electricity_produced_peak_cumulative', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Electricity produced peak cumulative', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'electricity_produced_peak_cumulative', + 'unique_id': 'da7be222ab3b420c927f3e49fade0304-electricity_produced_peak_cumulative', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_produced_peak_cumulative-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'P1 Electricity produced peak cumulative', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.p1_electricity_produced_peak_cumulative', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '709.442', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_produced_peak_interval-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.p1_electricity_produced_peak_interval', + '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 peak interval', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'electricity_produced_peak_interval', + 'unique_id': 'da7be222ab3b420c927f3e49fade0304-electricity_produced_peak_interval', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_produced_peak_interval-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'P1 Electricity produced peak interval', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.p1_electricity_produced_peak_interval', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_produced_peak_point-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.p1_electricity_produced_peak_point', + '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 peak point', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'electricity_produced_peak_point', + 'unique_id': 'da7be222ab3b420c927f3e49fade0304-electricity_produced_peak_point', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_electricity_produced_peak_point-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'power', + 'friendly_name': 'P1 Electricity produced peak point', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.p1_electricity_produced_peak_point', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_gas_consumed_cumulative-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.p1_gas_consumed_cumulative', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Gas consumed cumulative', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'gas_consumed_cumulative', + 'unique_id': 'da7be222ab3b420c927f3e49fade0304-gas_consumed_cumulative', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_gas_consumed_cumulative-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'gas', + 'friendly_name': 'P1 Gas consumed cumulative', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.p1_gas_consumed_cumulative', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '25.37', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_gas_consumed_interval-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.p1_gas_consumed_interval', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Gas consumed interval', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'gas_consumed_interval', + 'unique_id': 'da7be222ab3b420c927f3e49fade0304-gas_consumed_interval', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_gas_consumed_interval-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'P1 Gas consumed interval', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.p1_gas_consumed_interval', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.01', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_net_electricity_cumulative-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.p1_net_electricity_cumulative', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Net electricity cumulative', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'net_electricity_cumulative', + 'unique_id': 'da7be222ab3b420c927f3e49fade0304-net_electricity_cumulative', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_net_electricity_cumulative-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'P1 Net electricity cumulative', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.p1_net_electricity_cumulative', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '238.069', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_net_electricity_point-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.p1_net_electricity_point', + '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': 'Net electricity point', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'net_electricity_point', + 'unique_id': 'da7be222ab3b420c927f3e49fade0304-net_electricity_point', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_net_electricity_point-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'power', + 'friendly_name': 'P1 Net electricity point', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.p1_net_electricity_point', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '393', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_voltage_phase_one-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.p1_voltage_phase_one', + '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': 'Voltage phase one', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'voltage_phase_one', + 'unique_id': 'da7be222ab3b420c927f3e49fade0304-voltage_phase_one', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.p1_voltage_phase_one-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'voltage', + 'friendly_name': 'P1 Voltage phase one', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.p1_voltage_phase_one', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '234.6', + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.smile_anna_p1_outdoor_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.smile_anna_p1_outdoor_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': 'Outdoor temperature', + 'platform': 'plugwise', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'outdoor_temperature', + 'unique_id': '53130847be2f436cb946b78dedb9053a-outdoor_temperature', + 'unit_of_measurement': , + }) +# --- +# name: test_anna_p1_sensor_snapshot[platforms0][sensor.smile_anna_p1_outdoor_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'Smile Anna P1 Outdoor temperature', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.smile_anna_p1_outdoor_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '11.8', + }) +# --- # name: test_anna_sensor_snapshot[platforms0-True-anna_heatpump_heating][sensor.anna_cooling_setpoint-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/plugwise/test_climate.py b/tests/components/plugwise/test_climate.py index 440d53cf32e..6124c65dee7 100644 --- a/tests/components/plugwise/test_climate.py +++ b/tests/components/plugwise/test_climate.py @@ -471,16 +471,14 @@ async def test_anna_2_climate_snapshot( await snapshot_platform(hass, entity_registry, snapshot, setup_platform.entry_id) -@pytest.mark.parametrize("chosen_env", ["m_anna_heatpump_idle"], indirect=True) -@pytest.mark.parametrize("cooling_present", [True], indirect=True) @pytest.mark.parametrize("platforms", [(CLIMATE_DOMAIN,)]) @pytest.mark.usefixtures("entity_registry_enabled_by_default") -async def test_anna_3_climate_snapshot( +async def test_anna_p1_climate_snapshot( hass: HomeAssistant, - mock_smile_anna: MagicMock, + mock_smile_anna_p1: MagicMock, snapshot: SnapshotAssertion, entity_registry: er.EntityRegistry, setup_platform: MockConfigEntry, ) -> None: - """Test Anna 3 climate snapshot.""" + """Test Anna P1 climate snapshot.""" await snapshot_platform(hass, entity_registry, snapshot, setup_platform.entry_id) diff --git a/tests/components/plugwise/test_sensor.py b/tests/components/plugwise/test_sensor.py index 1538c8e691f..c4d1e563c0a 100644 --- a/tests/components/plugwise/test_sensor.py +++ b/tests/components/plugwise/test_sensor.py @@ -95,6 +95,19 @@ async def test_anna_sensor_snapshot( await snapshot_platform(hass, entity_registry, snapshot, setup_platform.entry_id) +@pytest.mark.parametrize("platforms", [(SENSOR_DOMAIN,)]) +@pytest.mark.usefixtures("entity_registry_enabled_by_default") +async def test_anna_p1_sensor_snapshot( + hass: HomeAssistant, + mock_smile_anna_p1: MagicMock, + snapshot: SnapshotAssertion, + entity_registry: er.EntityRegistry, + setup_platform: MockConfigEntry, +) -> None: + """Test Anna P1 sensor snapshot.""" + await snapshot_platform(hass, entity_registry, snapshot, setup_platform.entry_id) + + @pytest.mark.parametrize("chosen_env", ["p1v4_442_single"], indirect=True) @pytest.mark.parametrize( "gateway_id", ["a455b61e52394b2db5081ce025a430f3"], indirect=True