mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 13:57:10 +00:00
Add model_id filter to device selector (#135646)
* Add model_id filter to device selector * Rerun CI
This commit is contained in:
parent
8536f2b4cb
commit
fa40d02a07
@ -164,6 +164,8 @@ DEVICE_FILTER_SELECTOR_CONFIG_SCHEMA = vol.Schema(
|
||||
vol.Optional("manufacturer"): str,
|
||||
# Model of device
|
||||
vol.Optional("model"): str,
|
||||
# Model ID of device
|
||||
vol.Optional("model_id"): str,
|
||||
# Device has to contain entities matching this selector
|
||||
vol.Optional("entity"): vol.All(
|
||||
cv.ensure_list, [ENTITY_FILTER_SELECTOR_CONFIG_SCHEMA]
|
||||
@ -178,6 +180,7 @@ class DeviceFilterSelectorConfig(TypedDict, total=False):
|
||||
integration: str
|
||||
manufacturer: str
|
||||
model: str
|
||||
model_id: str
|
||||
|
||||
|
||||
class ActionSelectorConfig(TypedDict):
|
||||
|
@ -88,6 +88,7 @@ def _test_selector(
|
||||
({"integration": "zha"}, ("abc123",), (None,)),
|
||||
({"manufacturer": "mock-manuf"}, ("abc123",), (None,)),
|
||||
({"model": "mock-model"}, ("abc123",), (None,)),
|
||||
({"model_id": "mock-model_id"}, ("abc123",), (None,)),
|
||||
({"manufacturer": "mock-manuf", "model": "mock-model"}, ("abc123",), (None,)),
|
||||
(
|
||||
{"integration": "zha", "manufacturer": "mock-manuf", "model": "mock-model"},
|
||||
|
Loading…
x
Reference in New Issue
Block a user