Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
75468a1
Add dynamic Matter sensitivity slider discovery
wardmatter Apr 8, 2026
fb120a7
Make Matter sensitivity slider one-based
wardmatter Apr 8, 2026
1075942
Format Matter select test
wardmatter Apr 8, 2026
f53ce2b
Regenerate Matter snapshots
wardmatter Apr 8, 2026
c158202
regenerate test files manually
wardmatter Apr 8, 2026
5227e80
Merge branch 'dev' into codex/matter-sensitivity-slider
wardmatter Apr 8, 2026
354913b
Restore Matter sensitivity selects for migration
wardmatter Apr 10, 2026
d5978b4
Merge remote-tracking branch 'upstream/dev' into codex/matter-sensiti…
wardmatter Apr 10, 2026
561cd2c
Add Aqara multi-state P100 Matter fixture
wardmatter Apr 10, 2026
d46e67f
Add allow_multi to Matter legacy sensitivity selects
wardmatter Apr 10, 2026
4a65ed0
Merge branch 'codex/matter-sensitivity-slider' of https://github.com/…
wardmatter Apr 10, 2026
fa17bcd
Restore Matter tests and enable legacy sensitivity selects
wardmatter Apr 10, 2026
4284ba3
fix test
wardmatter Apr 10, 2026
4d09d6c
Remove Matter custom component version
wardmatter Apr 10, 2026
b5f1814
Disable Matter legacy sensitivity selects by default
wardmatter Apr 10, 2026
0cf7b22
enable select entity for aqara_door_window_p2 for testing
wardmatter Apr 10, 2026
375c7ca
Merge branch 'dev' into codex/matter-sensitivity-slider
wardmatter Apr 10, 2026
a998a29
Merge branch 'dev' into codex/matter-sensitivity-slider
wardmatter Apr 13, 2026
f7f0bd3
Update homeassistant/components/matter/number.py
wardmatter Apr 13, 2026
4c17644
Refine Matter sensitivity migration coverage
wardmatter Apr 13, 2026
e86f9f7
edit for cleaner diff of select.py
wardmatter Apr 13, 2026
4bfa267
Format Matter P100 node fixture
wardmatter Apr 13, 2026
82e545f
Update select.py comment
wardmatter Apr 22, 2026
ae41ef1
Merge branch 'dev' into codex/matter-sensitivity-slider
TheJulianJES Apr 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions homeassistant/components/matter/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,31 @@ def _update_from_device(self) -> None:
featuremap_contains=clusters.OccupancySensing.Bitmaps.Feature.kPassiveInfrared,
allow_multi=True,
),
MatterDiscoverySchema(
platform=Platform.NUMBER,
entity_description=MatterRangeNumberEntityDescription(
key="BooleanStateConfigurationCurrentSensitivityLevel",
entity_category=EntityCategory.CONFIG,
translation_key="sensitivity_level",
native_min_value=1,
native_step=1,
device_to_ha=lambda x: x + 1,
ha_to_device=lambda x: int(x) - 1,
max_attribute=(
clusters.BooleanStateConfiguration.Attributes.SupportedSensitivityLevels
),
mode=NumberMode.SLIDER,
),
entity_class=MatterRangeNumber,
required_attributes=(
clusters.BooleanStateConfiguration.Attributes.CurrentSensitivityLevel,
clusters.BooleanStateConfiguration.Attributes.SupportedSensitivityLevels,
),
featuremap_contains=(
clusters.BooleanStateConfiguration.Bitmaps.Feature.kSensitivityLevel
),
allow_multi=True,
),
MatterDiscoverySchema(
platform=Platform.NUMBER,
entity_description=MatterNumberEntityDescription(
Expand Down
9 changes: 9 additions & 0 deletions homeassistant/components/matter/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,11 +559,15 @@ def _update_from_device(self) -> None:
clusters.PumpConfigurationAndControl.Attributes.OperationMode,
),
),
# Keep the legacy vendor-specific select entities until HA 2026.11.0,
# so existing users can migrate before we remove them in favor of the
# generic number slider.
MatterDiscoverySchema(
platform=Platform.SELECT,
entity_description=MatterSelectEntityDescription(
Copy link
Copy Markdown
Member

@TheJulianJES TheJulianJES Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, let's deprecate the old select entities first by making them disabled by default.
If you add entity_registry_enabled_default=False to the MatterSelectEntityDescription, the old entities are disabled for newly paired devices, but still enabled on existing devices, since they might be used in automations there.

It should not cause any weird behavior. Both entities should update at the same time (if enabled). Though you need to add allow_multi=True to the number entity, so it doesn't "reserve" the CurrentSensitivityLevel attribute for itself, causing the old SELECT entities to not be discovered.

(I think due to how discovery works (first going through NUMBER, then SELECT schemas), it's enough to only add allow_multi=True to the number schemas, but let's also add it to the SELECT schemas as well to be a bit more consistent, and not depend on how the discovery order works.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

Thanks for the help!

The test won't pass with the entity_registry_enabled_default=False added, even the device aqara_door_window_p2 works in real life with this PR. Should I touch the test_select as well?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you got everything figured out now, with tests passing.
It's fine to add entity_registry_enabled_by_default to the test_select test, so the old entities are enabled by default for that test.

key="AqaraBooleanStateConfigurationCurrentSensitivityLevel",
entity_category=EntityCategory.CONFIG,
entity_registry_enabled_default=False,
translation_key="sensitivity_level",
options=["10 mm", "20 mm", "30 mm"],
device_to_ha={
Expand All @@ -583,12 +587,14 @@ def _update_from_device(self) -> None:
),
vendor_id=(4447,),
product_id=(8194,),
allow_multi=True,
),
MatterDiscoverySchema(
platform=Platform.SELECT,
entity_description=MatterSelectEntityDescription(
key="AqaraOccupancySensorBooleanStateConfigurationCurrentSensitivityLevel",
entity_category=EntityCategory.CONFIG,
entity_registry_enabled_default=False,
translation_key="sensitivity_level",
options=["low", "standard", "high"],
device_to_ha={
Expand All @@ -611,12 +617,14 @@ def _update_from_device(self) -> None:
8197,
8195,
),
allow_multi=True,
),
MatterDiscoverySchema(
platform=Platform.SELECT,
entity_description=MatterSelectEntityDescription(
key="HeimanOccupancySensorBooleanStateConfigurationCurrentSensitivityLevel",
entity_category=EntityCategory.CONFIG,
entity_registry_enabled_default=False,
translation_key="sensitivity_level",
options=["low", "standard", "high"],
device_to_ha={
Expand All @@ -636,6 +644,7 @@ def _update_from_device(self) -> None:
),
vendor_id=(4619,),
product_id=(4097,),
allow_multi=True,
),
MatterDiscoverySchema(
platform=Platform.SELECT,
Expand Down
3 changes: 3 additions & 0 deletions homeassistant/components/matter/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@
"pump_setpoint": {
"name": "Setpoint"
},
"sensitivity_level": {
"name": "Sensitivity"
},
"speaker_setpoint": {
"name": "Volume"
},
Expand Down
1 change: 1 addition & 0 deletions tests/components/matter/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"air_quality_sensor",
"aqara_door_window_p2",
"aqara_motion_p2",
"aqara_multi_state_p100",
"aqara_presence_fp300",
"aqara_sensor_w100",
"aqara_thermostat_w500",
Expand Down
Loading
Loading