From 12c62c085e6889401f5d3517d18875cd23daff08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20BOU=C3=89?= Date: Fri, 25 Sep 2026 08:36:36 +0200 Subject: [PATCH] Add Matter BatChargeState to mock_battery_storage test fixture (#183040) Co-authored-by: Claude Opus 5.5 --- .../fixtures/nodes/mock_battery_storage.json | 3 +- .../matter/snapshots/test_sensor.ambr | 62 +++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/tests/components/matter/fixtures/nodes/mock_battery_storage.json b/tests/components/matter/fixtures/nodes/mock_battery_storage.json index 8162318b15f5..3b85d1162df5 100644 --- a/tests/components/matter/fixtures/nodes/mock_battery_storage.json +++ b/tests/components/matter/fixtures/nodes/mock_battery_storage.json @@ -216,13 +216,14 @@ "1/47/13": 7200, "1/47/18": [], "1/47/24": 100000, + "1/47/26": 1, "1/47/27": 1800, "1/47/29": null, "1/47/30": null, "1/47/65528": [], "1/47/65529": [], "1/47/65531": [ - 65532, 65533, 0, 1, 2, 31, 5, 11, 12, 13, 18, 24, 27, 29, 30, 65528, + 65532, 65533, 0, 1, 2, 31, 5, 11, 12, 13, 18, 24, 26, 27, 29, 30, 65528, 65529, 65531 ], "1/156/65532": 0, diff --git a/tests/components/matter/snapshots/test_sensor.ambr b/tests/components/matter/snapshots/test_sensor.ambr index 4722f49ed2e1..47d2623ecac6 100644 --- a/tests/components/matter/snapshots/test_sensor.ambr +++ b/tests/components/matter/snapshots/test_sensor.ambr @@ -17954,6 +17954,68 @@ 'state': '90', }) # --- +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_battery_charge_state-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : list([ + 'not_charging', + 'charging', + 'full_charge', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': , + 'entity_id': 'sensor.mock_battery_storage_battery_charge_state', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Battery charge state', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Battery charge state', + 'platform': 'matter', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'battery_charge_state', + 'unique_id': '00000000000004D2-0000000000000019-MatterNodeDevice-1-PowerSourceBatChargeState-47-26', + 'unit_of_measurement': None, + }) +# --- +# name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_battery_charge_state-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'enum', + : 'Mock Battery Storage Battery charge state', + : list([ + 'not_charging', + 'charging', + 'full_charge', + ]), + }), + 'context': , + 'entity_id': 'sensor.mock_battery_storage_battery_charge_state', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'charging', + }) +# --- # name: test_sensors[mock_battery_storage][sensor.mock_battery_storage_battery_voltage-entry] EntityRegistryEntrySnapshot({ 'aliases': list([