Skip to content

Commit 7322fe4

Browse files
piitayaballoob
andauthored
Define fields for assist ask_question action (home-assistant#147219)
* Define fields for assist ask_question action * Update hassfest --------- Co-authored-by: Paulus Schoutsen <[email protected]>
1 parent 8eb906f commit 7322fe4

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

homeassistant/components/assist_satellite/services.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,17 @@ ask_question:
8686
required: false
8787
selector:
8888
object:
89+
label_field: sentences
90+
description_field: id
91+
multiple: true
92+
translation_key: answers
93+
fields:
94+
id:
95+
required: true
96+
selector:
97+
text:
98+
sentences:
99+
required: true
100+
selector:
101+
text:
102+
multiple: true

homeassistant/components/assist_satellite/strings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,13 @@
9090
}
9191
}
9292
}
93+
},
94+
"selector": {
95+
"answers": {
96+
"fields": {
97+
"id": "Answer ID",
98+
"sentences": "Sentences"
99+
}
100+
}
93101
}
94102
}

script/hassfest/translations.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,11 @@ def gen_strings_schema(config: Config, integration: Integration) -> vol.Schema:
306306
),
307307
vol.Optional("selector"): cv.schema_with_slug_keys(
308308
{
309-
"options": cv.schema_with_slug_keys(
309+
vol.Optional("options"): cv.schema_with_slug_keys(
310310
translation_value_validator,
311311
slug_validator=translation_key_validator,
312-
)
312+
),
313+
vol.Optional("fields"): cv.schema_with_slug_keys(str),
313314
},
314315
slug_validator=vol.Any("_", cv.slug),
315316
),

0 commit comments

Comments
 (0)