diff --git a/tests/components/matter/conftest.py b/tests/components/matter/conftest.py index cbc01d132a1..734369a3bb2 100644 --- a/tests/components/matter/conftest.py +++ b/tests/components/matter/conftest.py @@ -110,6 +110,7 @@ async def integration_fixture( "silabs_dishwasher", "silabs_evse_charging", "silabs_laundrywasher", + "silabs_refrigerator", "silabs_water_heater", "smoke_detector", "solar_power", diff --git a/tests/components/matter/fixtures/nodes/silabs_refrigerator.json b/tests/components/matter/fixtures/nodes/silabs_refrigerator.json new file mode 100644 index 00000000000..e4e04ac6ca1 --- /dev/null +++ b/tests/components/matter/fixtures/nodes/silabs_refrigerator.json @@ -0,0 +1,534 @@ +{ + "node_id": 58, + "date_commissioned": "2024-12-23T10:42:11.104085", + "last_interview": "2024-12-23T10:42:11.104098", + "interview_version": 6, + "available": true, + "is_bridge": false, + "attributes": { + "0/29/0": [ + { + "0": 22, + "1": 1 + } + ], + "0/29/1": [29, 31, 40, 42, 48, 49, 51, 53, 60, 62, 63], + "0/29/2": [41], + "0/29/3": [1, 2, 3], + "0/29/65532": 0, + "0/29/65533": 2, + "0/29/65528": [], + "0/29/65529": [], + "0/29/65531": [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533], + "0/31/0": [ + { + "1": 5, + "2": 2, + "3": [112233], + "4": null, + "254": 3 + } + ], + "0/31/1": [], + "0/31/2": 4, + "0/31/3": 3, + "0/31/4": 4, + "0/31/65532": 0, + "0/31/65533": 2, + "0/31/65528": [], + "0/31/65529": [], + "0/31/65531": [0, 1, 2, 3, 4, 65528, 65529, 65531, 65532, 65533], + "0/40/0": 18, + "0/40/1": "Silabs", + "0/40/2": 65521, + "0/40/3": "Refrigerator", + "0/40/4": 32782, + "0/40/5": "", + "0/40/6": "**REDACTED**", + "0/40/7": 1, + "0/40/8": "TEST_VERSION", + "0/40/9": 1, + "0/40/10": "1", + "0/40/11": "20200101", + "0/40/12": "", + "0/40/13": "", + "0/40/14": "", + "0/40/15": "", + "0/40/16": false, + "0/40/17": true, + "0/40/18": "3F67EB015C2A0D0E", + "0/40/19": { + "0": 3, + "1": 3 + }, + "0/40/21": 17039360, + "0/40/22": 1, + "0/40/65532": 0, + "0/40/65533": 3, + "0/40/65528": [], + "0/40/65529": [], + "0/40/65531": [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, + 22, 65528, 65529, 65531, 65532, 65533 + ], + "0/42/0": [], + "0/42/1": true, + "0/42/2": 1, + "0/42/3": null, + "0/42/65532": 0, + "0/42/65533": 1, + "0/42/65528": [], + "0/42/65529": [], + "0/42/65531": [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533], + "0/48/0": 0, + "0/48/1": { + "0": 60, + "1": 900 + }, + "0/48/2": 0, + "0/48/3": 0, + "0/48/4": true, + "0/48/65532": 0, + "0/48/65533": 1, + "0/48/65528": [1, 3, 5], + "0/48/65529": [0, 2, 4], + "0/48/65531": [0, 1, 2, 3, 4, 65528, 65529, 65531, 65532, 65533], + "0/49/0": 1, + "0/49/1": [ + { + "0": "p0jbsOzJRNw=", + "1": true + } + ], + "0/49/2": 10, + "0/49/3": 20, + "0/49/4": true, + "0/49/5": 0, + "0/49/6": "p0jbsOzJRNw=", + "0/49/7": null, + "0/49/9": 10, + "0/49/10": 5, + "0/49/65532": 2, + "0/49/65533": 2, + "0/49/65528": [1, 5, 7], + "0/49/65529": [0, 3, 4, 6, 8], + "0/49/65531": [ + 0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 65528, 65529, 65531, 65532, 65533 + ], + "0/51/0": [ + { + "0": "MyHome36", + "1": true, + "2": null, + "3": null, + "4": "spIfNquw4AU=", + "5": [], + "6": [ + "/U8h7+VkAADWDI9VgtWoMw==", + "/QANuACgAAAAAAD//gBEbQ==", + "/QANuACgAACT8m5dNLdrXA==", + "/oAAAAAAAACwkh82q7DgBQ==" + ], + "7": 4 + } + ], + "0/51/1": 1, + "0/51/2": 141, + "0/51/3": 0, + "0/51/4": 6, + "0/51/5": [], + "0/51/6": [], + "0/51/7": [], + "0/51/8": false, + "0/51/65532": 0, + "0/51/65533": 2, + "0/51/65528": [2], + "0/51/65529": [0, 1], + "0/51/65531": [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 65528, 65529, 65531, 65532, 65533 + ], + "0/53/0": 25, + "0/53/1": 4, + "0/53/2": "MyHome36", + "0/53/3": 4660, + "0/53/4": 12054125955590472924, + "0/53/5": "QP0ADbgAoAAA", + "0/53/7": [ + { + "0": 4222415899952472931, + "1": 8, + "2": 24576, + "3": 151026, + "4": 21588, + "5": 3, + "6": -71, + "7": -71, + "8": 0, + "9": 0, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 17459145101989614194, + "1": 3, + "2": 26624, + "3": 485082, + "4": 21597, + "5": 3, + "6": -38, + "7": -39, + "8": 0, + "9": 0, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 8241705229565301122, + "1": 18, + "2": 57344, + "3": 276088, + "4": 22218, + "5": 3, + "6": -52, + "7": -47, + "8": 0, + "9": 0, + "10": true, + "11": true, + "12": true, + "13": false + } + ], + "0/53/8": [ + { + "0": 0, + "1": 3072, + "2": 3, + "3": 17, + "4": 2, + "5": 0, + "6": 0, + "7": 142, + "8": true, + "9": false + }, + { + "0": 0, + "1": 17408, + "2": 17, + "3": 63, + "4": 0, + "5": 0, + "6": 0, + "7": 142, + "8": true, + "9": false + }, + { + "0": 4222415899952472931, + "1": 24576, + "2": 24, + "3": 17, + "4": 1, + "5": 3, + "6": 2, + "7": 9, + "8": true, + "9": true + }, + { + "0": 17459145101989614194, + "1": 26624, + "2": 26, + "3": 17, + "4": 1, + "5": 3, + "6": 3, + "7": 3, + "8": true, + "9": true + }, + { + "0": 0, + "1": 41984, + "2": 41, + "3": 17, + "4": 1, + "5": 0, + "6": 0, + "7": 25, + "8": true, + "9": false + }, + { + "0": 0, + "1": 43008, + "2": 42, + "3": 17, + "4": 2, + "5": 0, + "6": 0, + "7": 44, + "8": true, + "9": false + }, + { + "0": 0, + "1": 53248, + "2": 52, + "3": 17, + "4": 1, + "5": 0, + "6": 0, + "7": 142, + "8": true, + "9": false + }, + { + "0": 0, + "1": 55296, + "2": 54, + "3": 17, + "4": 1, + "5": 0, + "6": 0, + "7": 34, + "8": true, + "9": false + }, + { + "0": 8241705229565301122, + "1": 57344, + "2": 56, + "3": 17, + "4": 1, + "5": 3, + "6": 3, + "7": 18, + "8": true, + "9": true + } + ], + "0/53/9": 574987064, + "0/53/10": 68, + "0/53/11": 103, + "0/53/12": 223, + "0/53/13": 26, + "0/53/59": { + "0": 672, + "1": 143 + }, + "0/53/60": "AB//4A==", + "0/53/61": { + "0": true, + "1": false, + "2": true, + "3": true, + "4": true, + "5": true, + "6": false, + "7": true, + "8": true, + "9": true, + "10": true, + "11": true + }, + "0/53/62": [], + "0/53/65532": 0, + "0/53/65533": 2, + "0/53/65528": [], + "0/53/65529": [], + "0/53/65531": [ + 0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 59, 60, 61, 62, 65528, 65529, + 65531, 65532, 65533 + ], + "0/60/0": 0, + "0/60/1": null, + "0/60/2": null, + "0/60/65532": 0, + "0/60/65533": 1, + "0/60/65528": [], + "0/60/65529": [0, 2], + "0/60/65531": [0, 1, 2, 65528, 65529, 65531, 65532, 65533], + "0/62/0": [ + { + "1": "FTABAQEkAgE3AyQTAhgmBIAigScmBYAlTTo3BiQVAiQROhgkBwEkCAEwCUEExxLSpAQ5YJUVxH4v83Guzd2imtKrSMm2ADzJvNu3KGxkTF64CkFtfnORTwJmEpVfWDHJCNXRVQz0hJzXCM54nzcKNQEoARgkAgE2AwQCBAEYMAQUTE8wRXsn1uG3FSVnXrmgueY73FYwBRRT9HTfU5Nds+HA8j+/MRP+0pVyIxgwC0Dl506KGNd+m9BX72z6nm68F8SRkuJEvza7BQyg23LqfODl5ZWm8SnVH6GeN2j5TzbBIt31YApS2aNomn6YJ2YGGA==", + "2": "FTABAQEkAgE3AyQUARgmBIAigScmBYAlTTo3BiQTAhgkBwEkCAEwCUEEyT62Yt4qMI+MorlmQ/Hxh2CpLetznVknlAbhvYAwTexpSxp9GnhR09SrcUhz3mOb0eZa2TylqcnPBhHJ2Ih2RTcKNQEpARgkAmAwBBRT9HTfU5Nds+HA8j+/MRP+0pVyIzAFFOMCO8Jk7ZCknJquFGPtPzJiNqsDGDALQI/Kc38hQyK7AkT7/pN4hiYW3LoWKT3NA43+ssMJoVpDcaZ989GXBQKIbHKbBEXzUQ1J8wfL7l2pL0Z8Lso9JwgY", + "254": 3 + } + ], + "0/62/1": [ + { + "1": "BIrruNo7r0gX6j6lq1dDi5zeK3jxcTavjt2o4adCCSCYtbxOakfb7C3GXqgV4LzulFSinbewmYkdqFBHqm5pxvU=", + "2": 4939, + "3": 2, + "4": 58, + "5": "", + "254": 3 + } + ], + "0/62/2": 5, + "0/62/3": 3, + "0/62/4": [ + "FTABAQAkAgE3AyYUyakYCSYVj6gLsxgmBP2G+CskBQA3BiYUyakYCSYVj6gLsxgkBwEkCAEwCUEEgYwxrTB+tyiEGfrRwjlXTG34MiQtJXbg5Qqd0ohdRW7MfwYY7vZiX/0h9hI8MqUralFaVPcnghAP0MSJm1YrqTcKNQEpARgkAmAwBBS3BS9aJzt+p6i28Nj+trB2Uu+vdzAFFLcFL1onO36nqLbw2P62sHZS7693GDALQIrLt7Uq3S9HEe7apdzYSR+j3BLWNXSTLWD4YbrdyYLpm6xqHDV/NPARcIp4skZdtz91WwFBDfuS4jO5aVoER1sY", + "FTABAQAkAgE3AycUQhmZbaIbYjokFQIYJgRWZLcqJAUANwYnFEIZmW2iG2I6JBUCGCQHASQIATAJQQT2AlKGW/kOMjqayzeO0md523/fuhrhGEUU91uQpTiKo0I7wcPpKnmrwfQNPX6g0kEQl+VGaXa3e22lzfu5Tzp0Nwo1ASkBGCQCYDAEFOOMk13ScMKuT2hlaydi1yEJnhTqMAUU44yTXdJwwq5PaGVrJ2LXIQmeFOoYMAtAv2jJd1qd5miXbYesH1XrJ+vgyY0hzGuZ78N6Jw4Cb1oN1sLSpA+PNM0u7+hsEqcSvvn2eSV8EaRR+hg5YQjHDxg=", + "FTABAQEkAgE3AyQUARgmBIAigScmBYAlTTo3BiQUARgkBwEkCAEwCUEEiuu42juvSBfqPqWrV0OLnN4rePFxNq+O3ajhp0IJIJi1vE5qR9vsLcZeqBXgvO6UVKKdt7CZiR2oUEeqbmnG9TcKNQEpARgkAmAwBBTjAjvCZO2QpJyarhRj7T8yYjarAzAFFOMCO8Jk7ZCknJquFGPtPzJiNqsDGDALQE7hTxTRg92QOxwA1hK3xv8DaxvxL71r6ZHcNRzug9wNnonJ+NC84SFKvKDxwcBxHYqFdIyDiDgwJNTQIBgasmIY" + ], + "0/62/5": 3, + "0/62/65532": 0, + "0/62/65533": 1, + "0/62/65528": [1, 3, 5, 8], + "0/62/65529": [0, 2, 4, 6, 7, 9, 10, 11], + "0/62/65531": [0, 1, 2, 3, 4, 5, 65528, 65529, 65531, 65532, 65533], + "0/63/0": [], + "0/63/1": [], + "0/63/2": 4, + "0/63/3": 3, + "0/63/65532": 0, + "0/63/65533": 2, + "0/63/65528": [2, 5], + "0/63/65529": [0, 1, 3, 4], + "0/63/65531": [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533], + "1/3/0": 0, + "1/3/1": 2, + "1/3/65532": 0, + "1/3/65533": 4, + "1/3/65528": [], + "1/3/65529": [0], + "1/3/65531": [0, 1, 65528, 65529, 65531, 65532, 65533], + "1/6/0": false, + "1/6/65532": 0, + "1/6/65533": 6, + "1/6/65528": [], + "1/6/65529": [0, 1, 2], + "1/6/65531": [0, 65528, 65529, 65531, 65532, 65533], + "1/29/0": [ + { + "0": 112, + "1": 1 + } + ], + "1/29/1": [3, 6, 29, 82, 87], + "1/29/2": [], + "1/29/3": [2, 3], + "1/29/65532": 0, + "1/29/65533": 2, + "1/29/65528": [], + "1/29/65529": [], + "1/29/65531": [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533], + "1/82/0": [ + { + "0": "Normal", + "1": 0, + "2": [ + { + "1": 0 + } + ] + }, + { + "0": "Rapid Cool", + "1": 1, + "2": [ + { + "1": 16384 + } + ] + }, + { + "0": "Rapid Freeze", + "1": 2, + "2": [ + { + "1": 7 + }, + { + "1": 16385 + }, + { + "1": 0 + } + ] + } + ], + "1/82/1": 0, + "1/82/65532": 1, + "1/82/65533": 2, + "1/82/65528": [1], + "1/82/65529": [0], + "1/82/65531": [0, 1, 65528, 65529, 65531, 65532, 65533], + "1/87/0": 1, + "1/87/2": 0, + "1/87/3": 1, + "1/87/65532": 0, + "1/87/65533": 1, + "1/87/65528": [], + "1/87/65529": [], + "1/87/65531": [0, 2, 3, 65528, 65529, 65531, 65532, 65533], + "2/29/0": [ + { + "0": 113, + "1": 1 + } + ], + "2/29/1": [29, 86], + "2/29/2": [], + "2/29/3": [], + "2/29/4": [ + { + "0": null, + "1": 65, + "2": 1 + } + ], + "2/29/65532": 1, + "2/29/65533": 2, + "2/29/65528": [], + "2/29/65529": [], + "2/29/65531": [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533], + "2/86/0": -1800, + "2/86/1": -1800, + "2/86/2": -1500, + "2/86/3": 100, + "2/86/65532": 1, + "2/86/65533": 1, + "2/86/65528": [], + "2/86/65529": [0], + "2/86/65531": [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533], + "3/29/0": [ + { + "0": 113, + "1": 1 + } + ], + "3/29/1": [29, 86], + "3/29/2": [], + "3/29/3": [], + "3/29/4": [ + { + "0": null, + "1": 65, + "2": 0 + } + ], + "3/29/65532": 1, + "3/29/65533": 2, + "3/29/65528": [], + "3/29/65529": [], + "3/29/65531": [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533], + "3/86/0": 400, + "3/86/1": 100, + "3/86/2": 400, + "3/86/3": 100, + "3/86/65532": 1, + "3/86/65533": 1, + "3/86/65528": [], + "3/86/65529": [0], + "3/86/65531": [0, 1, 2, 3, 65528, 65529, 65531, 65532, 65533] + }, + "attribute_subscriptions": [] +} diff --git a/tests/components/matter/snapshots/test_button.ambr b/tests/components/matter/snapshots/test_button.ambr index 0563d1138b1..fe8ddb11aa9 100644 --- a/tests/components/matter/snapshots/test_button.ambr +++ b/tests/components/matter/snapshots/test_button.ambr @@ -1806,6 +1806,54 @@ 'state': 'unknown', }) # --- +# name: test_buttons[silabs_refrigerator][button.refrigerator_identify-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + '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.refrigerator_identify', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Identify', + 'platform': 'matter', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '00000000000004D2-000000000000003A-MatterNodeDevice-1-IdentifyButton-3-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_buttons[silabs_refrigerator][button.refrigerator_identify-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'identify', + 'friendly_name': 'Refrigerator Identify', + }), + 'context': , + 'entity_id': 'button.refrigerator_identify', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- # name: test_buttons[smoke_detector][button.smoke_sensor_identify-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/matter/snapshots/test_select.ambr b/tests/components/matter/snapshots/test_select.ambr index e9faf39c9ab..d05ff71964b 100644 --- a/tests/components/matter/snapshots/test_select.ambr +++ b/tests/components/matter/snapshots/test_select.ambr @@ -2015,6 +2015,64 @@ 'state': 'Colors', }) # --- +# name: test_selects[silabs_refrigerator][select.refrigerator_mode-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'Normal', + 'Rapid Cool', + 'Rapid Freeze', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'select', + 'entity_category': None, + 'entity_id': 'select.refrigerator_mode', + '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': 'Mode', + 'platform': 'matter', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'mode', + 'unique_id': '00000000000004D2-000000000000003A-MatterNodeDevice-1-MatterRefrigeratorAndTemperatureControlledCabinetMode-82-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_selects[silabs_refrigerator][select.refrigerator_mode-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Refrigerator Mode', + 'options': list([ + 'Normal', + 'Rapid Cool', + 'Rapid Freeze', + ]), + }), + 'context': , + 'entity_id': 'select.refrigerator_mode', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'Normal', + }) +# --- # name: test_selects[silabs_water_heater][select.water_heater_energy_management_mode-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/matter/snapshots/test_switch.ambr b/tests/components/matter/snapshots/test_switch.ambr index 4bc56a04ba8..f80aaefbf91 100644 --- a/tests/components/matter/snapshots/test_switch.ambr +++ b/tests/components/matter/snapshots/test_switch.ambr @@ -573,6 +573,54 @@ 'state': 'on', }) # --- +# name: test_switches[silabs_refrigerator][switch.refrigerator_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'switch', + 'entity_category': None, + 'entity_id': 'switch.refrigerator_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'matter', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'power', + 'unique_id': '00000000000004D2-000000000000003A-MatterNodeDevice-1-MatterPowerToggle-6-0', + 'unit_of_measurement': None, + }) +# --- +# name: test_switches[silabs_refrigerator][switch.refrigerator_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'switch', + 'friendly_name': 'Refrigerator Power', + }), + 'context': , + 'entity_id': 'switch.refrigerator_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- # name: test_switches[switch_unit][switch.mock_switchunit-entry] EntityRegistryEntrySnapshot({ 'aliases': set({