From 740e21a23bd4a01a35dce23ea1eaa6ef64f3f602 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Tue, 24 Mar 2026 13:56:36 +0100 Subject: [PATCH] Add new fridge fixture to SmartThings (#165198) --- tests/components/smartthings/__init__.py | 1 + .../device_status/da_ref_normal_100001.json | 215 ++++++++++++++++++ .../devices/da_ref_normal_100001.json | 193 ++++++++++++++++ .../snapshots/test_binary_sensor.ambr | 204 +++++++++++++++++ .../smartthings/snapshots/test_button.ambr | 50 ++++ .../smartthings/snapshots/test_init.ambr | 31 +++ .../smartthings/snapshots/test_sensor.ambr | 105 +++++++++ 7 files changed, 799 insertions(+) create mode 100644 tests/components/smartthings/fixtures/device_status/da_ref_normal_100001.json create mode 100644 tests/components/smartthings/fixtures/devices/da_ref_normal_100001.json diff --git a/tests/components/smartthings/__init__.py b/tests/components/smartthings/__init__.py index 84eeeea15fd..433729ae076 100644 --- a/tests/components/smartthings/__init__.py +++ b/tests/components/smartthings/__init__.py @@ -43,6 +43,7 @@ DEVICE_FIXTURES = [ "yale_push_button_deadbolt_lock", "ge_in_wall_smart_dimmer", "centralite", + "da_ref_normal_100001", "da_ref_normal_000001", "da_ref_normal_01011", "da_ref_normal_01011_onedoor", diff --git a/tests/components/smartthings/fixtures/device_status/da_ref_normal_100001.json b/tests/components/smartthings/fixtures/device_status/da_ref_normal_100001.json new file mode 100644 index 00000000000..0a00c7d96c1 --- /dev/null +++ b/tests/components/smartthings/fixtures/device_status/da_ref_normal_100001.json @@ -0,0 +1,215 @@ +{ + "components": { + "onedoor": { + "contactSensor": { + "contact": { + "value": "closed", + "timestamp": "2025-12-09T19:17:58.742Z" + } + }, + "custom.disabledCapabilities": { + "disabledCapabilities": { + "value": null + } + }, + "thermostatCoolingSetpoint": { + "coolingSetpointRange": { + "value": null + }, + "coolingSetpoint": { + "value": null + } + } + }, + "cooler": { + "contactSensor": { + "contact": { + "value": null + } + }, + "custom.disabledCapabilities": { + "disabledCapabilities": { + "value": null + } + }, + "thermostatCoolingSetpoint": { + "coolingSetpointRange": { + "value": null + }, + "coolingSetpoint": { + "value": 1, + "unit": "C", + "timestamp": "2025-11-02T10:44:35.450Z" + } + } + }, + "freezer": { + "contactSensor": { + "contact": { + "value": null + } + }, + "custom.disabledCapabilities": { + "disabledCapabilities": { + "value": null + } + }, + "thermostatCoolingSetpoint": { + "coolingSetpointRange": { + "value": null + }, + "coolingSetpoint": { + "value": null + } + } + }, + "main": { + "custom.disabledComponents": { + "disabledComponents": { + "value": null + } + }, + "contactSensor": { + "contact": { + "value": "closed", + "timestamp": "2025-12-09T19:17:58.742Z" + } + }, + "ocf": { + "st": { + "value": null + }, + "mndt": { + "value": null + }, + "mnfv": { + "value": null + }, + "mnhw": { + "value": null + }, + "di": { + "value": "C097277F-0DCF-0000-0000-000000000000", + "timestamp": "2025-11-02T10:44:35.429Z" + }, + "mnsl": { + "value": null + }, + "dmv": { + "value": "res.1.1.0,sh.1.1.0", + "timestamp": "2025-11-02T10:44:35.429Z" + }, + "n": { + "value": "Refrigerator", + "timestamp": "2025-11-02T10:44:35.429Z" + }, + "mnmo": { + "value": "DONGLE_0281|00090741|00090028001130300100000000000000", + "timestamp": "2025-11-02T10:44:35.429Z" + }, + "vid": { + "value": "DA-REF-NORMAL-100001", + "timestamp": "2025-11-02T10:44:35.429Z" + }, + "mnmn": { + "value": "Samsung Electronics", + "timestamp": "2025-11-02T10:44:35.429Z" + }, + "mnml": { + "value": null + }, + "mnpv": { + "value": null + }, + "mnos": { + "value": null + }, + "pi": { + "value": "shp", + "timestamp": "2025-11-02T10:44:35.429Z" + }, + "icv": { + "value": "core.1.1.0", + "timestamp": "2025-11-02T10:44:35.429Z" + } + }, + "refrigeration": { + "defrost": { + "value": null + }, + "rapidCooling": { + "value": "off", + "timestamp": "2025-12-09T09:20:45.161Z" + }, + "rapidFreezing": { + "value": null + } + }, + "custom.disabledCapabilities": { + "disabledCapabilities": { + "value": null + } + }, + "samsungce.driverVersion": { + "versionNumber": { + "value": 22083101, + "timestamp": "2024-01-27T15:33:41.832Z" + } + }, + "refresh": {}, + "execute": { + "data": { + "value": null + } + }, + "custom.waterFilter": { + "waterFilterUsageStep": { + "value": null + }, + "waterFilterResetType": { + "value": null + }, + "waterFilterCapacity": { + "value": null + }, + "waterFilterLastResetDate": { + "value": null + }, + "waterFilterUsage": { + "value": null + }, + "waterFilterStatus": { + "value": null + } + }, + "thermostatCoolingSetpoint": { + "coolingSetpointRange": { + "value": null + }, + "coolingSetpoint": { + "value": null + } + } + }, + "cvroom": { + "contactSensor": { + "contact": { + "value": null + } + }, + "custom.disabledCapabilities": { + "disabledCapabilities": { + "value": null + } + }, + "thermostatCoolingSetpoint": { + "coolingSetpointRange": { + "value": null + }, + "coolingSetpoint": { + "value": null + } + } + } + } +} diff --git a/tests/components/smartthings/fixtures/devices/da_ref_normal_100001.json b/tests/components/smartthings/fixtures/devices/da_ref_normal_100001.json new file mode 100644 index 00000000000..9a7adb31f81 --- /dev/null +++ b/tests/components/smartthings/fixtures/devices/da_ref_normal_100001.json @@ -0,0 +1,193 @@ +{ + "items": [ + { + "deviceId": "C097277F-0DCF-0000-0000-000000000000", + "name": "Refrigerator", + "label": "Kj\u00f8leskap", + "manufacturerName": "Samsung Electronics", + "presentationId": "DA-REF-NORMAL-100001", + "deviceManufacturerCode": "Samsung Electronics", + "locationId": "1aae117e-39a8-4690-a9c9-c094b46dcf21", + "ownerId": "d262d517-4a99-671b-8d9c-8f2d88738136", + "roomId": "c64432c1-eaa3-4c05-a17a-8b01ce1dc3c5", + "deviceTypeName": "Samsung OCF Refrigerator", + "components": [ + { + "id": "main", + "label": "main", + "capabilities": [ + { + "id": "contactSensor", + "version": 1 + }, + { + "id": "execute", + "version": 1 + }, + { + "id": "ocf", + "version": 1 + }, + { + "id": "refresh", + "version": 1 + }, + { + "id": "refrigeration", + "version": 1 + }, + { + "id": "thermostatCoolingSetpoint", + "version": 1 + }, + { + "id": "custom.disabledCapabilities", + "version": 1 + }, + { + "id": "custom.disabledComponents", + "version": 1 + }, + { + "id": "custom.waterFilter", + "version": 1 + }, + { + "id": "samsungce.driverVersion", + "version": 1 + } + ], + "categories": [ + { + "name": "Refrigerator", + "categoryType": "manufacturer" + } + ], + "optional": false + }, + { + "id": "freezer", + "label": "freezer", + "capabilities": [ + { + "id": "contactSensor", + "version": 1 + }, + { + "id": "thermostatCoolingSetpoint", + "version": 1 + }, + { + "id": "custom.disabledCapabilities", + "version": 1 + } + ], + "categories": [ + { + "name": "Other", + "categoryType": "manufacturer" + } + ], + "optional": false + }, + { + "id": "cooler", + "label": "cooler", + "capabilities": [ + { + "id": "contactSensor", + "version": 1 + }, + { + "id": "thermostatCoolingSetpoint", + "version": 1 + }, + { + "id": "custom.disabledCapabilities", + "version": 1 + } + ], + "categories": [ + { + "name": "Other", + "categoryType": "manufacturer" + } + ], + "optional": false + }, + { + "id": "cvroom", + "label": "cvroom", + "capabilities": [ + { + "id": "contactSensor", + "version": 1 + }, + { + "id": "thermostatCoolingSetpoint", + "version": 1 + }, + { + "id": "custom.disabledCapabilities", + "version": 1 + } + ], + "categories": [ + { + "name": "Other", + "categoryType": "manufacturer" + } + ], + "optional": false + }, + { + "id": "onedoor", + "label": "onedoor", + "capabilities": [ + { + "id": "contactSensor", + "version": 1 + }, + { + "id": "thermostatCoolingSetpoint", + "version": 1 + }, + { + "id": "custom.disabledCapabilities", + "version": 1 + } + ], + "categories": [ + { + "name": "Other", + "categoryType": "manufacturer" + } + ], + "optional": false + } + ], + "createTime": "2024-01-27T15:33:41.668Z", + "profile": { + "id": "10ea47c7-59fb-312d-84ec-638f155f0011" + }, + "ocf": { + "ocfDeviceType": "oic.d.refrigerator", + "name": "Refrigerator", + "specVersion": "core.1.1.0", + "verticalDomainSpecVersion": "res.1.1.0,sh.1.1.0", + "manufacturerName": "Samsung Electronics", + "modelNumber": "DONGLE_0281|00090741|00090028001130300100000000000000", + "vendorId": "DA-REF-NORMAL-100001", + "lastSignupTime": "2024-01-27T15:33:41.520918Z", + "transferCandidate": false, + "additionalAuthCodeRequired": false + }, + "type": "OCF", + "restrictionTier": 0, + "allowed": null, + "executionContext": "CLOUD", + "relationships": [] + } + ], + "_links": {} +} diff --git a/tests/components/smartthings/snapshots/test_binary_sensor.ambr b/tests/components/smartthings/snapshots/test_binary_sensor.ambr index 7c1c0058132..4796609a6f4 100644 --- a/tests/components/smartthings/snapshots/test_binary_sensor.ambr +++ b/tests/components/smartthings/snapshots/test_binary_sensor.ambr @@ -1973,6 +1973,210 @@ 'state': 'off', }) # --- +# name: test_all_entities[da_ref_normal_100001][binary_sensor.kjoleskap_coolselect_door-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.kjoleskap_coolselect_door', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'CoolSelect+ door', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'CoolSelect+ door', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'cool_select_plus_door', + 'unique_id': 'C097277F-0DCF-0000-0000-000000000000_cvroom_contactSensor_contact_contact', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_ref_normal_100001][binary_sensor.kjoleskap_coolselect_door-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'door', + 'friendly_name': 'Kjøleskap CoolSelect+ door', + }), + 'context': , + 'entity_id': 'binary_sensor.kjoleskap_coolselect_door', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_all_entities[da_ref_normal_100001][binary_sensor.kjoleskap_filter_status-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.kjoleskap_filter_status', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Filter status', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Filter status', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'filter_status', + 'unique_id': 'C097277F-0DCF-0000-0000-000000000000_main_custom.waterFilter_waterFilterStatus_waterFilterStatus', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_ref_normal_100001][binary_sensor.kjoleskap_filter_status-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'problem', + 'friendly_name': 'Kjøleskap Filter status', + }), + 'context': , + 'entity_id': 'binary_sensor.kjoleskap_filter_status', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_all_entities[da_ref_normal_100001][binary_sensor.kjoleskap_freezer_door-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.kjoleskap_freezer_door', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Freezer door', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Freezer door', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'freezer_door', + 'unique_id': 'C097277F-0DCF-0000-0000-000000000000_freezer_contactSensor_contact_contact', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_ref_normal_100001][binary_sensor.kjoleskap_freezer_door-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'door', + 'friendly_name': 'Kjøleskap Freezer door', + }), + 'context': , + 'entity_id': 'binary_sensor.kjoleskap_freezer_door', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- +# name: test_all_entities[da_ref_normal_100001][binary_sensor.kjoleskap_fridge_door-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'binary_sensor', + 'entity_category': None, + 'entity_id': 'binary_sensor.kjoleskap_fridge_door', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Fridge door', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Fridge door', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'cooler_door', + 'unique_id': 'C097277F-0DCF-0000-0000-000000000000_cooler_contactSensor_contact_contact', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_ref_normal_100001][binary_sensor.kjoleskap_fridge_door-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'door', + 'friendly_name': 'Kjøleskap Fridge door', + }), + 'context': , + 'entity_id': 'binary_sensor.kjoleskap_fridge_door', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- # name: test_all_entities[da_rvc_map_01011][binary_sensor.robot_vacuum_dust_bag_full-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ diff --git a/tests/components/smartthings/snapshots/test_button.ambr b/tests/components/smartthings/snapshots/test_button.ambr index e6ff9593013..2f3793406dc 100644 --- a/tests/components/smartthings/snapshots/test_button.ambr +++ b/tests/components/smartthings/snapshots/test_button.ambr @@ -499,6 +499,56 @@ 'state': 'unknown', }) # --- +# name: test_all_entities[da_ref_normal_100001][button.kjoleskap_reset_water_filter-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'button', + 'entity_category': , + 'entity_id': 'button.kjoleskap_reset_water_filter', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reset water filter', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Reset water filter', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'reset_water_filter', + 'unique_id': 'C097277F-0DCF-0000-0000-000000000000_main_custom.waterFilter_resetWaterFilter', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_ref_normal_100001][button.kjoleskap_reset_water_filter-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Kjøleskap Reset water filter', + }), + 'context': , + 'entity_id': 'button.kjoleskap_reset_water_filter', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- # name: test_all_entities[da_rvc_map_01011][button.robot_vacuum_reset_hepa_filter-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ diff --git a/tests/components/smartthings/snapshots/test_init.ambr b/tests/components/smartthings/snapshots/test_init.ambr index fbe842f7c62..0a5be0edf6f 100644 --- a/tests/components/smartthings/snapshots/test_init.ambr +++ b/tests/components/smartthings/snapshots/test_init.ambr @@ -1084,6 +1084,37 @@ 'via_device_id': None, }) # --- +# name: test_devices[da_ref_normal_100001] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'config_entries_subentries': , + 'configuration_url': 'https://account.smartthings.com', + 'connections': set({ + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'smartthings', + 'C097277F-0DCF-0000-0000-000000000000', + ), + }), + 'labels': set({ + }), + 'manufacturer': 'Samsung Electronics', + 'model': 'DONGLE_0281', + 'model_id': None, + 'name': 'Kjøleskap', + 'name_by_user': None, + 'primary_config_entry': , + 'serial_number': None, + 'sw_version': None, + 'via_device_id': None, + }) +# --- # name: test_devices[da_rvc_map_01011] DeviceRegistryEntrySnapshot({ 'area_id': None, diff --git a/tests/components/smartthings/snapshots/test_sensor.ambr b/tests/components/smartthings/snapshots/test_sensor.ambr index 4fd4be34428..fffbf5e374c 100644 --- a/tests/components/smartthings/snapshots/test_sensor.ambr +++ b/tests/components/smartthings/snapshots/test_sensor.ambr @@ -11468,6 +11468,111 @@ 'state': '3', }) # --- +# name: test_all_entities[da_ref_normal_100001][sensor.kjoleskap_cooling_setpoint-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.kjoleskap_cooling_setpoint', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Cooling setpoint', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Cooling setpoint', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'thermostat_cooling_setpoint', + 'unique_id': 'C097277F-0DCF-0000-0000-000000000000_main_thermostatCoolingSetpoint_coolingSetpoint_coolingSetpoint', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_ref_normal_100001][sensor.kjoleskap_cooling_setpoint-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'temperature', + 'friendly_name': 'Kjøleskap Cooling setpoint', + }), + 'context': , + 'entity_id': 'sensor.kjoleskap_cooling_setpoint', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- +# name: test_all_entities[da_ref_normal_100001][sensor.kjoleskap_water_filter_usage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + '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.kjoleskap_water_filter_usage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Water filter usage', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Water filter usage', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'water_filter_usage', + 'unique_id': 'C097277F-0DCF-0000-0000-000000000000_main_custom.waterFilter_waterFilterUsage_waterFilterUsage', + 'unit_of_measurement': '%', + }) +# --- +# name: test_all_entities[da_ref_normal_100001][sensor.kjoleskap_water_filter_usage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Kjøleskap Water filter usage', + 'state_class': , + 'unit_of_measurement': '%', + }), + 'context': , + 'entity_id': 'sensor.kjoleskap_water_filter_usage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- # name: test_all_entities[da_rvc_map_01011][sensor.robot_vacuum_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': list([