diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d777774d..535af40cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ Versions from 0.40 and up +## v0.60.0 + +- New Feature: add support for Anna P1 via plugwise [v1.9.0](https://github.com/plugwise/python-plugwise/releases/tag/v1.9.0) + ## v0.59.0 - New Feature: use RestoreState in climate to save schedule en regulation status, also via plugwise [v1.8.3](https://github.com/plugwise/python-plugwise/releases/tag/v1.8.3) diff --git a/README.md b/README.md index 01d1e6b75..0f9778582 100644 --- a/README.md +++ b/README.md @@ -53,8 +53,8 @@ Our [Changelog](CHANGELOG.MD) is available as a [separate file](CHANGELOG.md) in ### What do we support (in short)? - Thermostats - - Adam (firmware 2.x and 3.x) and the accompanying Anna, Jip's, Lisa's, Tom's, Floor's and Plugs (Koen via a Plug). From v0.55.0 zones with one or more thermostats are represented as a single and separate climate-entity in HA. - - Anna (firmware 1.x, 3.x and 4.x) + - Adam (firmware 2.x and 3.x) and the accompanying Anna, Emma's, Jip's, Lisa's, Tom's, Floor's and Plugs (Koen via a Plug). From v0.55.0 zones with one or more thermostats are represented as a single and separate climate-entity in HA. + - Anna (firmware 1.x, 3.x and 4.x) and Anna P1 (4.x) - Notifications for both types - Power-related - Smile P1 (firmware 2.x, 3.x and 4.x) diff --git a/custom_components/plugwise/manifest.json b/custom_components/plugwise/manifest.json index 5bf957fc5..d5f4d9df8 100644 --- a/custom_components/plugwise/manifest.json +++ b/custom_components/plugwise/manifest.json @@ -7,7 +7,7 @@ "integration_type": "hub", "iot_class": "local_polling", "loggers": ["plugwise"], - "requirements": ["plugwise==1.8.3"], - "version": "0.59.0", + "requirements": ["plugwise==1.9.0"], + "version": "0.60.0", "zeroconf": ["_plugwise._tcp.local."] } diff --git a/pyproject.toml b/pyproject.toml index 591801c8b..e26df2d75 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "plugwise-beta" -version = "0.59.0" +version = "0.60.0" description = "Plugwise beta custom-component" readme = "README.md" requires-python = ">=3.13" diff --git a/tests/components/plugwise/conftest.py b/tests/components/plugwise/conftest.py index 9a9267608..438244914 100644 --- a/tests/components/plugwise/conftest.py +++ b/tests/components/plugwise/conftest.py @@ -263,6 +263,34 @@ def mock_smile_anna(chosen_env: str, cooling_present: bool) -> Generator[MagicMo yield api +@pytest.fixture +def mock_smile_anna_2() -> Generator[MagicMock]: + """Create a 2nd Mock Anna 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 000000000..fd0bc91fb --- /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 5a1cdebd3..000000000 --- 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 63dc6a419..368f13946 100644 --- a/tests/components/plugwise/snapshots/test_climate.ambr +++ b/tests/components/plugwise/snapshots/test_climate.ambr @@ -658,7 +658,7 @@ 'state': 'auto', }) # --- -# name: test_anna_3_climate_snapshot[platforms0-True-m_anna_heatpump_idle][climate.anna-entry] +# name: test_anna_3_climate_snapshot[platforms0][climate.anna-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ }), @@ -666,16 +666,16 @@ 'capabilities': dict({ 'hvac_modes': list([ , - , + , ]), 'max_temp': 30.0, 'min_temp': 4.0, 'preset_modes': list([ - 'no_frost', 'home', - 'away', 'asleep', + 'away', 'vacation', + 'no_frost', ]), 'target_temp_step': 0.1, }), @@ -702,43 +702,42 @@ 'platform': 'plugwise', 'previous_unique_id': None, 'suggested_object_id': None, - 'supported_features': , + 'supported_features': , 'translation_key': 'plugwise', - 'unique_id': '3cb70739631c4d17a86b8b12e8a5161b-climate', + 'unique_id': '1e5e55b958ac445583602f767cb45942-climate', 'unit_of_measurement': None, }) # --- -# name: test_anna_3_climate_snapshot[platforms0-True-m_anna_heatpump_idle][climate.anna-state] +# name: test_anna_3_climate_snapshot[platforms0][climate.anna-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'current_temperature': 23.0, + '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([ - 'no_frost', 'home', - 'away', 'asleep', + 'away', 'vacation', + 'no_frost', ]), - 'supported_features': , - 'target_temp_high': 30.0, - 'target_temp_low': 20.5, + 'supported_features': , 'target_temp_step': 0.1, + 'temperature': 19.0, }), 'context': , 'entity_id': 'climate.anna', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': 'auto', + 'state': 'heat', }) # --- # name: test_anna_climate_snapshot[platforms0-True-anna_heatpump_heating][climate.anna-entry] diff --git a/tests/components/plugwise/snapshots/test_sensor.ambr b/tests/components/plugwise/snapshots/test_sensor.ambr index 5489c1477..1da770889 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 e3cb4fa20..9a348bc67 100644 --- a/tests/components/plugwise/test_climate.py +++ b/tests/components/plugwise/test_climate.py @@ -466,13 +466,11 @@ 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( hass: HomeAssistant, - mock_smile_anna: MagicMock, + mock_smile_anna_2: MagicMock, snapshot: SnapshotAssertion, entity_registry: er.EntityRegistry, setup_platform: MockConfigEntry, diff --git a/tests/components/plugwise/test_sensor.py b/tests/components/plugwise/test_sensor.py index d587a04af..aeb74eab1 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_2: 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