diff --git a/tests/components/matter/common.py b/tests/components/matter/common.py index 23a5ec57553..c2e3c2fcec0 100644 --- a/tests/components/matter/common.py +++ b/tests/components/matter/common.py @@ -96,6 +96,7 @@ FIXTURES = [ "secuyou_smart_lock", "silabs_dishwasher", "silabs_evse_charging", + "silabs_fan", "silabs_laundrywasher", "silabs_light_switch", "silabs_refrigerator", diff --git a/tests/components/matter/fixtures/nodes/silabs_fan.json b/tests/components/matter/fixtures/nodes/silabs_fan.json new file mode 100644 index 00000000000..3c177b2431b --- /dev/null +++ b/tests/components/matter/fixtures/nodes/silabs_fan.json @@ -0,0 +1,639 @@ +{ + "node_id": 99, + "date_commissioned": "2026-03-15T20:01:47.597000", + "last_interview": "2026-03-15T20:02:02.001000", + "interview_version": 6, + "available": true, + "is_bridge": false, + "attributes": { + "0/65/0": [], + "0/65/65533": 1, + "0/65/65532": 0, + "0/65/65531": [0, 65532, 65533, 65528, 65529, 65531], + "0/65/65529": [], + "0/65/65528": [], + "0/64/0": [], + "0/64/65533": 1, + "0/64/65532": 0, + "0/64/65531": [0, 65532, 65533, 65528, 65529, 65531], + "0/64/65529": [], + "0/64/65528": [], + "0/63/0": [], + "0/63/1": [], + "0/63/2": 4, + "0/63/3": 3, + "0/63/65533": 2, + "0/63/65532": 0, + "0/63/65531": [0, 1, 2, 3, 65532, 65533, 65528, 65529, 65531], + "0/63/65529": [0, 1, 3, 4], + "0/63/65528": [5, 2], + "0/62/0": [ + { + "1": "FTABAQQkAgE3AyQTAhgmBBmLaC8mBZnBFUQ3BiQVAiQRYxgkBwEkCAEwCUEEaIMteYNolcHMUEZyU1kf4IEgR79a9nb37HZroVrTrZJxxSmgVqeMcylsR4pStGWGQHRxfURvhrhSCW2Uqa0zazcKNQEoARgkAgE2AwQCBAEYMAQULQNi8ynkb3SqgbenQcJZTYeOP3owBRRa34d1hFPuca7UFWclq9cFnlPhShgwC0D6K3Ds3SVlY1rjljz8+u0LB/7YFkpxK5DCD5wRQz86w3bX25sQFbjOjD8x/nlcDBBKf5LRgI3yTMOWlrCkAdYfGA==", + "2": "FTABAQEkAgE3AyQUARgmBIAigScmBYAlTTo3BiQTAhgkBwEkCAEwCUEEAV5qZprx2HWOKSP2iCzsI7A0CHgZVtbwsQ/y4ssETfB9z00733STIN0AfD552Vi1h6fJSeEg0/pA82bJL/y0azcKNQEpARgkAmAwBBRa34d1hFPuca7UFWclq9cFnlPhSjAFFG9oKFV1nAO5dx/+jKvq8o8oKcZbGDALQDD8OnB1NcHRxx387f9wZeFDYf32VZ3ZENQrlWBTQZqEKP+K6XjWmjTWttDEeW1kiNtB1T5ZBIaJUxVdqMuNQx8Y", + "254": 3 + } + ], + "0/62/1": [ + { + "1": "BG1FPaj8U/IZMJ0lkYRWnL7PNr67I7GmbKqrzOPKp92GWZkMLbxHskSpehAxMxW6nepQHWr+Eq9LLp7wy4CB7a4=", + "2": 4939, + "3": 2, + "4": 99, + "5": "ha-test", + "254": 3 + } + ], + "0/62/2": 5, + "0/62/3": 3, + "0/62/4": [ + "FTABAQAkAgE3AyYUyakYCSYVj6gLsxgmBFO9STEkBQA3BiYUyakYCSYVj6gLsxgkBwEkCAEwCUEEgYwxrTB+tyiEGfrRwjlXTG34MiQtJXbg5Qqd0ohdRW7MfwYY7vZiX/0h9hI8MqUralFaVPcnghAP0MSJm1YrqTcKNQEpARgkAmAwBBS3BS9aJzt+p6i28Nj+trB2Uu+vdzAFFLcFL1onO36nqLbw2P62sHZS7693GDALQL0jOtrtJoye0t5B1pFR1l51E5jeBZGVGRx8yHq0gvIgC0e96LokvX6O+Whm63Tl+8blZa1h/WTdiydMnGKVV4UY", + "FTABAQAkAgE3AycUQhmZbaIbYjokFQIYJgRWZLcqJAUANwYnFEIZmW2iG2I6JBUCGCQHASQIATAJQQT2AlKGW/kOMjqayzeO0md523/fuhrhGEUU91uQpTiKo0I7wcPpKnmrwfQNPX6g0kEQl+VGaXa3e22lzfu5Tzp0Nwo1ASkBGCQCYDAEFOOMk13ScMKuT2hlaydi1yEJnhTqMAUU44yTXdJwwq5PaGVrJ2LXIQmeFOoYMAtAv2jJd1qd5miXbYesH1XrJ+vgyY0hzGuZ78N6Jw4Cb1oN1sLSpA+PNM0u7+hsEqcSvvn2eSV8EaRR+hg5YQjHDxg=", + "FTABAQEkAgE3AyQUARgmBIAigScmBYAlTTo3BiQUARgkBwEkCAEwCUEEbUU9qPxT8hkwnSWRhFacvs82vrsjsaZsqqvM48qn3YZZmQwtvEeyRKl6EDEzFbqd6lAdav4Sr0sunvDLgIHtrjcKNQEpARgkAmAwBBRvaChVdZwDuXcf/oyr6vKPKCnGWzAFFG9oKFV1nAO5dx/+jKvq8o8oKcZbGDALQLa3jnnqN0/o6VG8wM4V9FDzrgDfKPd5cn3BBz77K80Jzo/aNotaTNOa6zX//yIvOkBZfGyq1Dh1vXZ4g2NKcXoY" + ], + "0/62/5": 3, + "0/62/65533": 2, + "0/62/65532": 0, + "0/62/65531": [0, 1, 2, 3, 4, 5, 65532, 65533, 65528, 65529, 65531], + "0/62/65529": [0, 2, 4, 6, 7, 9, 10, 11, 12, 13], + "0/62/65528": [1, 3, 5, 8, 14], + "0/60/0": 0, + "0/60/1": null, + "0/60/2": null, + "0/60/65533": 1, + "0/60/65532": 0, + "0/60/65531": [0, 1, 2, 65532, 65533, 65528, 65529, 65531], + "0/60/65529": [0, 2], + "0/60/65528": [], + "0/52/0": [ + { + "0": 10, + "1": "UART", + "3": 336 + }, + { + "0": 9, + "1": "Fan", + "3": 3076 + }, + { + "0": 8, + "1": "Bluetoot", + "3": 1224 + }, + { + "0": 7, + "1": "Bluetoot", + "3": 608 + }, + { + "0": 6, + "1": "Bluetoot", + "3": 380 + }, + { + "0": 5, + "1": "shell", + "3": 1280 + }, + { + "0": 4, + "1": "OT Seria", + "3": 2896 + }, + { + "0": 3, + "1": "Tmr Svc", + "3": 1060 + }, + { + "0": 2, + "1": "IDLE", + "3": 1064 + }, + { + "0": 1, + "1": "OT Stack", + "3": 2832 + }, + { + "0": 0, + "1": "CHIP", + "3": 3088 + } + ], + "0/52/1": 104320, + "0/52/2": 26112, + "0/52/65533": 1, + "0/52/65532": 1, + "0/52/65531": [0, 1, 2, 3, 65532, 65533, 65528, 65529, 65531], + "0/52/65529": [0], + "0/52/65528": [], + "0/52/3": 35288, + "0/51/0": [ + { + "0": "MyHome", + "1": true, + "2": null, + "3": null, + "4": "Hh33j1J0OU4=", + "5": [], + "6": [ + "/QANuACgAAAAAAD//gAkAA==", + "/VX8YmMnAAEQOUd3e+xZhA==", + "/QANuACgAACU6CQJ0+DGIQ==", + "/oAAAAAAAAAcHfePUnQ5Tg==" + ], + "7": 4 + } + ], + "0/51/1": 1, + "0/51/2": 394, + "0/51/3": 0, + "0/51/4": 6, + "0/51/5": [], + "0/51/6": [], + "0/51/7": [], + "0/51/8": false, + "0/51/65533": 2, + "0/51/65532": 0, + "0/51/65531": [ + 0, 1, 8, 3, 4, 5, 6, 7, 2, 65532, 65533, 65528, 65529, 65531 + ], + "0/51/65529": [0, 1], + "0/51/65528": [2], + "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/65533": 2, + "0/48/65532": 0, + "0/48/65531": [0, 1, 2, 3, 4, 65532, 65533, 65528, 65529, 65531], + "0/48/65529": [0, 2, 4], + "0/48/65528": [1, 3, 5], + "0/44/0": 0, + "0/44/65533": 1, + "0/44/65532": 0, + "0/44/65531": [0, 65532, 65533, 65528, 65529, 65531], + "0/44/65529": [], + "0/44/65528": [], + "0/43/0": "en-US", + "0/43/1": ["en-US"], + "0/43/65533": 1, + "0/43/65532": 0, + "0/43/65531": [0, 1, 65532, 65533, 65528, 65529, 65531], + "0/43/65529": [], + "0/43/65528": [], + "0/40/0": 19, + "0/40/1": "Silabs", + "0/40/2": 65521, + "0/40/3": "SL_Fan", + "0/40/4": 32773, + "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/18": "7C09BB25275DC136", + "0/40/19": { + "0": 3, + "1": 3 + }, + "0/40/21": 17104896, + "0/40/22": 1, + "0/40/24": 1, + "0/40/65533": 5, + "0/40/65532": 0, + "0/40/65531": [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 19, 21, 22, 11, 12, 13, 14, 15, 16, 18, + 65532, 65533, 65528, 65529, 65531 + ], + "0/40/65529": [], + "0/40/65528": [], + "0/31/0": [ + { + "1": 5, + "2": 2, + "3": [112233], + "4": null, + "254": 3 + } + ], + "0/31/2": 4, + "0/31/3": 3, + "0/31/4": 4, + "0/31/65533": 2, + "0/31/65532": 0, + "0/31/65531": [0, 2, 3, 4, 65532, 65533, 65528, 65529, 65531], + "0/31/65529": [], + "0/31/65528": [], + "0/29/0": [ + { + "0": 22, + "1": 1 + } + ], + "0/29/1": [65, 64, 63, 62, 60, 52, 51, 48, 44, 43, 40, 31, 29, 49, 42, 53], + "0/29/2": [41], + "0/29/3": [1], + "0/29/65533": 3, + "0/29/65532": 0, + "0/29/65531": [0, 1, 2, 3, 65532, 65533, 65528, 65529, 65531], + "0/29/65529": [], + "0/29/65528": [], + "0/49/0": 1, + "0/49/1": [ + { + "0": "p0jbsOzJRNw=", + "1": true + } + ], + "0/49/4": true, + "0/49/5": 0, + "0/49/6": "p0jbsOzJRNw=", + "0/49/7": null, + "0/49/2": 10, + "0/49/3": 20, + "0/49/9": 10, + "0/49/10": 5, + "0/49/65533": 2, + "0/49/65532": 2, + "0/49/65531": [ + 0, 1, 4, 5, 6, 7, 2, 3, 9, 10, 65532, 65533, 65528, 65529, 65531 + ], + "0/49/65529": [0, 3, 4, 6, 8], + "0/49/65528": [1, 5, 7], + "0/42/0": [], + "0/42/1": true, + "0/42/2": 1, + "0/42/3": null, + "0/42/65533": 1, + "0/42/65532": 0, + "0/42/65531": [0, 1, 2, 3, 65532, 65533, 65528, 65529, 65531], + "0/42/65529": [0], + "0/42/65528": [], + "0/53/0": 25, + "0/53/1": 5, + "0/53/2": "MyHome", + "0/53/3": 4660, + "0/53/4": 12054125955590472924, + "0/53/5": "QP0ADbgAoAAA", + "0/53/7": [ + { + "0": 7061919368606463488, + "1": 17, + "2": 3072, + "3": 1729386, + "4": 111166, + "5": 3, + "6": -41, + "7": -42, + "8": 0, + "9": 0, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 2202349555917590819, + "1": 17, + "2": 25600, + "3": 421691, + "4": 193083, + "5": 3, + "6": -66, + "7": -66, + "8": 58, + "9": 2, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 10563246212816049995, + "1": 27, + "2": 26624, + "3": 444355, + "4": 68004, + "5": 3, + "6": -47, + "7": -49, + "8": 0, + "9": 0, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 14318601490803184919, + "1": 15, + "2": 33792, + "3": 1114210, + "4": 116186, + "5": 3, + "6": -53, + "7": -53, + "8": 0, + "9": 0, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 6498271992183290326, + "1": 13, + "2": 40960, + "3": 924853, + "4": 849689, + "5": 3, + "6": -55, + "7": -56, + "8": 15, + "9": 0, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 4206032556233211940, + "1": 15, + "2": 53248, + "3": 298977, + "4": 107155, + "5": 3, + "6": -76, + "7": -77, + "8": 0, + "9": 0, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 3385988815368794773, + "1": 11, + "2": 57344, + "3": 2237645, + "4": 106995, + "5": 2, + "6": -81, + "7": -81, + "8": 75, + "9": 8, + "10": true, + "11": true, + "12": true, + "13": false + }, + { + "0": 8265194500311707858, + "1": 26, + "2": 58368, + "3": 257719, + "4": 116620, + "5": 3, + "6": -60, + "7": -61, + "8": 0, + "9": 0, + "10": true, + "11": true, + "12": true, + "13": false + } + ], + "0/53/8": [ + { + "0": 7061919368606463488, + "1": 3072, + "2": 3, + "3": 40, + "4": 1, + "5": 3, + "6": 3, + "7": 18, + "8": true, + "9": true + }, + { + "0": 2170162790398179662, + "1": 9216, + "2": 9, + "3": 63, + "4": 0, + "5": 0, + "6": 0, + "7": 0, + "8": true, + "9": false + }, + { + "0": 0, + "1": 12288, + "2": 12, + "3": 63, + "4": 0, + "5": 0, + "6": 0, + "7": 42, + "8": true, + "9": false + }, + { + "0": 0, + "1": 14336, + "2": 14, + "3": 25, + "4": 2, + "5": 0, + "6": 0, + "7": 108, + "8": true, + "9": false + }, + { + "0": 2202349555917590819, + "1": 25600, + "2": 25, + "3": 40, + "4": 1, + "5": 3, + "6": 3, + "7": 18, + "8": true, + "9": true + }, + { + "0": 10563246212816049995, + "1": 26624, + "2": 26, + "3": 40, + "4": 1, + "5": 3, + "6": 3, + "7": 27, + "8": true, + "9": true + }, + { + "0": 14318601490803184919, + "1": 33792, + "2": 33, + "3": 40, + "4": 1, + "5": 3, + "6": 3, + "7": 15, + "8": true, + "9": true + }, + { + "0": 6498271992183290326, + "1": 40960, + "2": 40, + "3": 57, + "4": 1, + "5": 3, + "6": 3, + "7": 13, + "8": true, + "9": true + }, + { + "0": 4206032556233211940, + "1": 53248, + "2": 52, + "3": 3, + "4": 1, + "5": 3, + "6": 2, + "7": 16, + "8": true, + "9": true + }, + { + "0": 3385988815368794773, + "1": 57344, + "2": 56, + "3": 40, + "4": 1, + "5": 2, + "6": 0, + "7": 12, + "8": true, + "9": true + }, + { + "0": 8265194500311707858, + "1": 58368, + "2": 57, + "3": 40, + "4": 1, + "5": 3, + "6": 3, + "7": 26, + "8": true, + "9": true + } + ], + "0/53/9": 1775826714, + "0/53/10": 64, + "0/53/11": 130, + "0/53/12": 25, + "0/53/13": 57, + "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/63": null, + "0/53/64": null, + "0/53/65533": 3, + "0/53/65532": 0, + "0/53/65531": [ + 0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 59, 60, 61, 62, 65532, 65533, + 65528, 65529, 65531 + ], + "0/53/65529": [], + "0/53/65528": [], + "1/29/0": [ + { + "0": 43, + "1": 1 + } + ], + "1/29/1": [29, 3, 4, 514], + "1/29/2": [], + "1/29/3": [], + "1/29/65533": 3, + "1/29/65532": 0, + "1/29/65531": [0, 1, 2, 3, 65532, 65533, 65528, 65529, 65531], + "1/29/65529": [], + "1/29/65528": [], + "1/3/0": 0, + "1/3/1": 2, + "1/3/65533": 6, + "1/3/65532": 0, + "1/3/65531": [0, 1, 65532, 65533, 65528, 65529, 65531], + "1/3/65529": [0, 64], + "1/3/65528": [], + "1/4/0": 128, + "1/4/65533": 4, + "1/4/65532": 1, + "1/4/65531": [0, 65532, 65533, 65528, 65529, 65531], + "1/4/65529": [0, 1, 2, 3, 4, 5], + "1/4/65528": [0, 1, 2, 3], + "1/514/0": 1, + "1/514/1": 2, + "1/514/2": 30, + "1/514/3": 30, + "1/514/65533": 5, + "1/514/65532": 63, + "1/514/65531": [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 65532, 65533, 65528, 65529, 65531 + ], + "1/514/65529": [0], + "1/514/65528": [], + "1/514/4": 10, + "1/514/5": 3, + "1/514/6": 3, + "1/514/7": 1, + "1/514/8": 0, + "1/514/9": 3, + "1/514/10": 0, + "1/514/11": 0 + }, + "attribute_subscriptions": [] +} diff --git a/tests/components/matter/snapshots/test_button.ambr b/tests/components/matter/snapshots/test_button.ambr index e1389b605a5..4b918362b8f 100644 --- a/tests/components/matter/snapshots/test_button.ambr +++ b/tests/components/matter/snapshots/test_button.ambr @@ -3782,6 +3782,56 @@ 'state': 'unknown', }) # --- +# name: test_buttons[silabs_fan][button.sl_fan_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.sl_fan_identify', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Identify', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Identify', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': '00000000000004D2-0000000000000063-MatterNodeDevice-1-IdentifyButton-3-1', + 'unit_of_measurement': None, + }) +# --- +# name: test_buttons[silabs_fan][button.sl_fan_identify-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'identify', + 'friendly_name': 'SL_Fan Identify', + }), + 'context': , + 'entity_id': 'button.sl_fan_identify', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- # name: test_buttons[silabs_laundrywasher][button.laundrywasher_identify-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/matter/snapshots/test_fan.ambr b/tests/components/matter/snapshots/test_fan.ambr index ef2f8cc8cc5..0709ecb26b9 100644 --- a/tests/components/matter/snapshots/test_fan.ambr +++ b/tests/components/matter/snapshots/test_fan.ambr @@ -335,3 +335,75 @@ 'state': 'off', }) # --- +# name: test_fans[silabs_fan][fan.sl_fan-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'preset_modes': list([ + 'low', + 'medium', + 'high', + 'auto', + 'natural_wind', + 'sleep_wind', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'fan', + 'entity_category': None, + 'entity_id': 'fan.sl_fan', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': None, + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': , + 'translation_key': 'fan', + 'unique_id': '00000000000004D2-0000000000000063-MatterNodeDevice-1-MatterFan-514-0', + 'unit_of_measurement': None, + }) +# --- +# name: test_fans[silabs_fan][fan.sl_fan-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'direction': 'forward', + 'friendly_name': 'SL_Fan', + 'oscillating': False, + 'percentage': 30, + 'percentage_step': 10.0, + 'preset_mode': 'low', + 'preset_modes': list([ + 'low', + 'medium', + 'high', + 'auto', + 'natural_wind', + 'sleep_wind', + ]), + 'supported_features': , + }), + 'context': , + 'entity_id': 'fan.sl_fan', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'on', + }) +# ---