mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Add support for device class in target selector (#43768)
This commit is contained in:
parent
2f73590714
commit
a5c79a1f84
@ -120,4 +120,4 @@ class TargetSelector(Selector):
|
|||||||
Value should follow cv.ENTITY_SERVICE_FIELDS format.
|
Value should follow cv.ENTITY_SERVICE_FIELDS format.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
CONFIG_SCHEMA = vol.Schema({"entity": {"domain": str}})
|
CONFIG_SCHEMA = vol.Schema({"entity": {"domain": str, "device_class": str}})
|
||||||
|
@ -125,6 +125,7 @@ def test_time_selector_schema(schema):
|
|||||||
{},
|
{},
|
||||||
{"entity": {}},
|
{"entity": {}},
|
||||||
{"entity": {"domain": "light"}},
|
{"entity": {"domain": "light"}},
|
||||||
|
{"entity": {"domain": "binary_sensor", "device_class": "motion"}},
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
def test_target_selector_schema(schema):
|
def test_target_selector_schema(schema):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user