Skip to content

Commit c72f2fd

Browse files
authored
Add Matter CurrentSensitivityLevel for Heiman and Aqara Occupancy/PIR (#155715)
1 parent f54864a commit c72f2fd

File tree

8 files changed

+1082
-0
lines changed

8 files changed

+1082
-0
lines changed

homeassistant/components/matter/select.py

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,4 +527,57 @@ def _update_from_device(self) -> None:
527527
vendor_id=(4447,),
528528
product_id=(8194,),
529529
),
530+
MatterDiscoverySchema(
531+
platform=Platform.SELECT,
532+
entity_description=MatterSelectEntityDescription(
533+
key="AqaraOccupancySensorBooleanStateConfigurationCurrentSensitivityLevel",
534+
entity_category=EntityCategory.CONFIG,
535+
translation_key="sensitivity_level",
536+
options=["low", "standard", "high"],
537+
device_to_ha={
538+
0: "low",
539+
1: "standard",
540+
2: "high",
541+
}.get,
542+
ha_to_device={
543+
"low": 0,
544+
"standard": 1,
545+
"high": 2,
546+
}.get,
547+
),
548+
entity_class=MatterAttributeSelectEntity,
549+
required_attributes=(
550+
clusters.BooleanStateConfiguration.Attributes.CurrentSensitivityLevel,
551+
),
552+
vendor_id=(4447,),
553+
product_id=(
554+
8197,
555+
8195,
556+
),
557+
),
558+
MatterDiscoverySchema(
559+
platform=Platform.SELECT,
560+
entity_description=MatterSelectEntityDescription(
561+
key="HeimanOccupancySensorBooleanStateConfigurationCurrentSensitivityLevel",
562+
entity_category=EntityCategory.CONFIG,
563+
translation_key="sensitivity_level",
564+
options=["low", "standard", "high"],
565+
device_to_ha={
566+
0: "low",
567+
1: "standard",
568+
2: "high",
569+
}.get,
570+
ha_to_device={
571+
"low": 0,
572+
"standard": 1,
573+
"high": 2,
574+
}.get,
575+
),
576+
entity_class=MatterAttributeSelectEntity,
577+
required_attributes=(
578+
clusters.BooleanStateConfiguration.Attributes.CurrentSensitivityLevel,
579+
),
580+
vendor_id=(4619,),
581+
product_id=(4097,),
582+
),
530583
]

tests/components/matter/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ async def integration_fixture(
103103
"generic_switch",
104104
"generic_switch_multi",
105105
"haojai_switch",
106+
"heiman_motion_sensor_m1",
106107
"humidity_sensor",
107108
"inovelli_vtm30",
108109
"laundry_dryer",

0 commit comments

Comments
 (0)