mirror of
https://github.com/home-assistant/core.git
synced 2025-09-03 11:51:40 +02:00
Add product_id
support to Matter discovery schemas (#151307)
This commit is contained in:
@@ -78,6 +78,13 @@ def async_discover_entities(
|
|||||||
):
|
):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# check product_id
|
||||||
|
if (
|
||||||
|
schema.product_id is not None
|
||||||
|
and device_info.productID not in schema.product_id
|
||||||
|
):
|
||||||
|
continue
|
||||||
|
|
||||||
# check product_name
|
# check product_name
|
||||||
if (
|
if (
|
||||||
schema.product_name is not None
|
schema.product_name is not None
|
||||||
|
@@ -100,6 +100,9 @@ class MatterDiscoverySchema:
|
|||||||
# [optional] the endpoint's vendor_id must match ANY of these values
|
# [optional] the endpoint's vendor_id must match ANY of these values
|
||||||
vendor_id: tuple[int, ...] | None = None
|
vendor_id: tuple[int, ...] | None = None
|
||||||
|
|
||||||
|
# [optional] the endpoint's product_id must match ANY of these values
|
||||||
|
product_id: tuple[int, ...] | None = None
|
||||||
|
|
||||||
# [optional] the endpoint's product_name must match ANY of these values
|
# [optional] the endpoint's product_name must match ANY of these values
|
||||||
product_name: tuple[str, ...] | None = None
|
product_name: tuple[str, ...] | None = None
|
||||||
|
|
||||||
|
@@ -525,6 +525,6 @@ DISCOVERY_SCHEMAS = [
|
|||||||
clusters.BooleanStateConfiguration.Attributes.CurrentSensitivityLevel,
|
clusters.BooleanStateConfiguration.Attributes.CurrentSensitivityLevel,
|
||||||
),
|
),
|
||||||
vendor_id=(4447,),
|
vendor_id=(4447,),
|
||||||
product_name=("Aqara Door and Window Sensor P2",),
|
product_id=(8194,),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
Reference in New Issue
Block a user