mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 18:28:14 +02:00
Add fields and multiple support to object selector (#147215)
* Add schema supports to object selector * Update format * Update homeassistant/helpers/selector.py Co-authored-by: G Johansson <goran.johansson@shiftit.se> --------- Co-authored-by: G Johansson <goran.johansson@shiftit.se>
This commit is contained in:
@ -590,7 +590,28 @@ def test_action_selector_schema(schema, valid_selections, invalid_selections) ->
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("schema", "valid_selections", "invalid_selections"),
|
||||
[({}, ("abc123",), ())],
|
||||
[
|
||||
({}, ("abc123",), ()),
|
||||
(
|
||||
{
|
||||
"fields": {
|
||||
"name": {
|
||||
"required": True,
|
||||
"selector": {"text": {}},
|
||||
},
|
||||
"percentage": {
|
||||
"selector": {"number": {}},
|
||||
},
|
||||
},
|
||||
"multiple": True,
|
||||
"label_field": "name",
|
||||
"description_field": "percentage",
|
||||
},
|
||||
(),
|
||||
(),
|
||||
),
|
||||
],
|
||||
[],
|
||||
)
|
||||
def test_object_selector_schema(schema, valid_selections, invalid_selections) -> None:
|
||||
"""Test object selector."""
|
||||
|
Reference in New Issue
Block a user