From 2bcd02b296d3f3bdee3cc3146da3f3084f2c649e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20BOU=C3=89?= Date: Wed, 14 Jan 2026 06:58:55 +0100 Subject: [PATCH] Add MatterOutdoorTemperature attribute to Matter binary sensor discovery schema only if OutdoorTemperature exists (#160879) --- .../components/matter/binary_sensor.py | 5 +- .../matter/snapshots/test_binary_sensor.ambr | 96 ------------------- 2 files changed, 4 insertions(+), 97 deletions(-) diff --git a/homeassistant/components/matter/binary_sensor.py b/homeassistant/components/matter/binary_sensor.py index a3148f3719f..71e43d6dfff 100644 --- a/homeassistant/components/matter/binary_sensor.py +++ b/homeassistant/components/matter/binary_sensor.py @@ -528,7 +528,10 @@ DISCOVERY_SCHEMAS = [ ), ), entity_class=MatterBinarySensor, - required_attributes=(clusters.Thermostat.Attributes.RemoteSensing,), + required_attributes=( + clusters.Thermostat.Attributes.RemoteSensing, + clusters.Thermostat.Attributes.OutdoorTemperature, + ), allow_multi=True, ), MatterDiscoverySchema( diff --git a/tests/components/matter/snapshots/test_binary_sensor.ambr b/tests/components/matter/snapshots/test_binary_sensor.ambr index 9b2254e7fd3..b483fff7dd7 100644 --- a/tests/components/matter/snapshots/test_binary_sensor.ambr +++ b/tests/components/matter/snapshots/test_binary_sensor.ambr @@ -439,54 +439,6 @@ 'state': 'off', }) # --- -# name: test_binary_sensors[eve_thermo_v4][binary_sensor.eve_thermo_20ebp1701_outdoor_temperature_remote_sensing-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'binary_sensor', - 'entity_category': , - 'entity_id': 'binary_sensor.eve_thermo_20ebp1701_outdoor_temperature_remote_sensing', - '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': 'Outdoor temperature remote sensing', - 'platform': 'matter', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'thermostat_remote_sensing_outdoor_temperature', - 'unique_id': '00000000000004D2-0000000000000021-MatterNodeDevice-1-ThermostatRemoteSensing_OutdoorTemperature-513-26', - 'unit_of_measurement': None, - }) -# --- -# name: test_binary_sensors[eve_thermo_v4][binary_sensor.eve_thermo_20ebp1701_outdoor_temperature_remote_sensing-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'Eve Thermo 20EBP1701 Outdoor temperature remote sensing', - }), - 'context': , - 'entity_id': 'binary_sensor.eve_thermo_20ebp1701_outdoor_temperature_remote_sensing', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- # name: test_binary_sensors[eve_thermo_v5][binary_sensor.eve_thermo_20ecd1701_local_temperature_remote_sensing-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -535,54 +487,6 @@ 'state': 'off', }) # --- -# name: test_binary_sensors[eve_thermo_v5][binary_sensor.eve_thermo_20ecd1701_outdoor_temperature_remote_sensing-entry] - EntityRegistryEntrySnapshot({ - 'aliases': set({ - }), - 'area_id': None, - 'capabilities': None, - 'config_entry_id': , - 'config_subentry_id': , - 'device_class': None, - 'device_id': , - 'disabled_by': None, - 'domain': 'binary_sensor', - 'entity_category': , - 'entity_id': 'binary_sensor.eve_thermo_20ecd1701_outdoor_temperature_remote_sensing', - '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': 'Outdoor temperature remote sensing', - 'platform': 'matter', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': 'thermostat_remote_sensing_outdoor_temperature', - 'unique_id': '00000000000004D2-000000000000000C-MatterNodeDevice-1-ThermostatRemoteSensing_OutdoorTemperature-513-26', - 'unit_of_measurement': None, - }) -# --- -# name: test_binary_sensors[eve_thermo_v5][binary_sensor.eve_thermo_20ecd1701_outdoor_temperature_remote_sensing-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'Eve Thermo 20ECD1701 Outdoor temperature remote sensing', - }), - 'context': , - 'entity_id': 'binary_sensor.eve_thermo_20ecd1701_outdoor_temperature_remote_sensing', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'off', - }) -# --- # name: test_binary_sensors[heiman_motion_sensor_m1][binary_sensor.smart_motion_sensor_occupancy-entry] EntityRegistryEntrySnapshot({ 'aliases': set({