Commit Graph

7 Commits (38adfbf1a39758a02e97693e6ab7388e4b86a06c)

Author SHA1 Message Date
Michael Hansen c2c98bd04c
Move default response out of sentence trigger registration and into agent (#109317)
* Move default response out of trigger and into agent

* Add test
2024-02-01 20:40:29 +01:00
Erik Montnemery 9bff039d17
Add set_conversation_response script action (#108233)
* Add set_conversation_response script action

* Update homeassistant/components/conversation/trigger.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Revert accidental change

* Add test

* Ignore mypy

* Remove incorrect callback decorator

* Update homeassistant/helpers/script.py

* Add test with templated set_conversation_response

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-01-23 09:13:42 -05:00
Tudor Sandu d3ed8a6b8b
Validate empty sentence triggers (#103579)
* Validate empty sentence triggers

* Add extra test for no sentences

* Remove extra line

---------

Co-authored-by: Michael Hansen <mike@rhasspy.org>
2023-11-07 11:56:24 -06:00
Michael Hansen 7e3fdd85fc
Add wildcards to sentence triggers (#97236)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-07-27 20:30:42 +02:00
Michael Hansen 6b8ae0ec86
Ensure trigger sentences do not contain punctuation (#95633)
* Ensure trigger sentences do not contain punctuation

* Update homeassistant/components/conversation/trigger.py

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-30 13:06:26 -05:00
Michael Hansen 3d84c6e21c
Use "Done" as a default response for sentence triggers (#95463)
* Use "Done" as a default response for sentence triggers

* Move response to trigger callback
2023-06-28 12:34:55 -04:00
Michael Hansen d811fa0e74
Sentence trigger (#94613)
* Add async_register_trigger_sentences for default agent

* Add trigger response and trigger handler

* Check callback in test

* Clean up and move response to callback

* Add trigger test

* Drop TriggerAction

* Test we pass sentence to callback

* Match triggers once, allow multiple sentences

* Don't use trigger id

* Use async callback

* No response for now

* Use asyncio.gather for callback responses

* Fix after rebase

* Use a list for trigger sentences

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-22 18:29:34 -05:00