Commit Graph

23 Commits (00118a6f965fb8bd04025fa13bdbca86841e96d8)

Author SHA1 Message Date
J. Nick Koston 691a234090
Cache the names and area lists in the default agent (#86874)
* Cache the names and area lists in the default agent

fixes #86803

* add coverage to make sure the entity cache busts

* add areas test

* cover the last line
2023-01-29 07:16:29 -05:00
Michael Hansen adeaf746ec
Use device area id in intent matching (#86678)
* Use device area id when matching

* Normalize whitespace in response

* Add extra test entity
2023-01-26 09:48:49 -06:00
Paulus Schoutsen 6c8efe3a3b
Conversation cleanup (#86592)
* Require config entry when setting Conversation agent, add new unset agent method

* Remove onboarding from conversation agent

* Type attribution

* Wrap async_process params in ConversationInput object
2023-01-24 21:47:49 -06:00
Michael Hansen ea95abcb30
Use intent responses from home-assistant-intents (#86484)
* Use intent responses from home_assistant_intents

* Use error responses from home_assistant_intents

* Remove speech checks for intent tests (set by conversation now)

* Bump hassil and home-assistant-intents versions

* Use Home Assistant JSON reader when loading intents

* Remove speech checks for light tests (done in agent)

* Add more tests for code coverage

* Add test for reloading on new component

* Add test for non-default response
2023-01-23 22:38:41 -05:00
Michael Hansen 255611238b
Conversation config (#86326)
* Restore conversation config

* Fall back to en for en_US, etc.

* Simplify config passing around

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-01-20 21:39:49 -05:00
Michael Hansen 5aca996f22
HassTurnOn/Off intents to also handle cover entities (#86206)
* Move entity/area resolution to async_match_states

* Special case for covers in HassTurnOn/Off

* Enable light color/brightness on areas

* Remove async_register from default agent

* Remove CONFIG_SCHEMA from conversation component

* Fix intent tests

* Fix light test

* Move entity/area resolution to async_match_states

* Special case for covers in HassTurnOn/Off

* Enable light color/brightness on areas

* Remove async_register from default agent

* Remove CONFIG_SCHEMA from conversation component

* Fix intent tests

* Fix light test

* Fix humidifier intent handlers

* Remove DATA_CONFIG for conversation

* Copy ServiceIntentHandler code to light

* Add proper errors to humidifier intent handlers
2023-01-19 17:15:01 -06:00
Paulus Schoutsen 9631146745
Add conversation mobile app webhook (#86239)
* Add conversation mobile app webhook

* Re-instate removed unused import which was used as fixture
2023-01-19 13:59:02 -05:00
Michael Hansen 2f98485ae7
Add conversation reload service (#86175)
* Add preload and reload service calls to conversation

* Add conversation preload/reload to websocket API

* Merge prepare into reload

* reload service and prepare websocket API

* Add preload and reload service calls to conversation

* Add conversation preload/reload to websocket API

* Merge prepare into reload

* reload service and prepare websocket API

* Add language lock for loading intents

* Add more tests for code coverage
2023-01-18 19:36:51 -06:00
Michael Hansen 07bd208c7d
Load custom sentences from config directory (#85558)
* Load custom sentences from config directory

* Load custom sentences from config directory

* Custom sentences in custom_sentences/<language>/

* Load custom sentences from config directory

* Custom sentences in custom_sentences/<language>/

* Add custom_sentences test
2023-01-09 16:48:59 -06:00
Michael Hansen ecaec0332d
Hassil intents (#85156)
* Add hassil to requirements

* Add intent sentences

* Update sentences

* Use hassil to recognize intents in conversation

* Fix tests

* Bump hassil due to dependency conflict

* Add dataclasses-json package contraints

* Bump hassil (removes dataclasses-json dependency)

* Remove climate sentences until intents are supported

* Move I/O outside event loop

* Bump hassil to 0.2.3

* Fix light tests

* Handle areas in intents

* Clean up code according to suggestions

* Remove sentences from repo

* Use home-assistant-intents package

* Apply suggestions from code review

* Flake8

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-01-07 16:20:21 -05:00
Michael Hansen 961c8cc167
Update intent response (#83858)
* Add language to conversation and intent response

* Move language to intent response instead of speech

* Extend intent response for voice MVP

* Add tests for error conditions in conversation/process

* Move intent response type data into "data" field

* Move intent response error message back to speech

* Remove "success" from intent response

* Add id to target in intent response

* target defaults to None

* Update homeassistant/helpers/intent.py

* Fix test

* Return conversation_id and multiple targets

* Clean up git mess

* Fix linting errors

* Fix more async_handle signatures

* Separate conversation_id and IntentResponse

* Add unknown error code

* Add ConversationResult

* Don't set domain on single entity

* Language is required for intent response

* Add partial_action_done

* Default language in almond agent

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-12-13 16:46:40 -06:00
Michael Hansen ac87528bec
Add language to conversation and intent response (#83486)
* Add language to conversation and intent response

* Add language parameter to conversation/process service

* Move language to intent response instead of speech

* Add language to almond conversation agent

* Fix intent test
2022-12-08 11:39:28 -05:00
epenet 7e0515b119
Remove conversation from mypy ignore list (#74991) 2022-07-11 17:47:33 +02:00
Josh Soref 4bf0510b78
spelling: components/conversation (#64238)
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2022-01-17 16:27:25 +01:00
Marc Mueller b1d49b3b66
Use assignment expressions 29 (#58713) 2021-10-30 16:31:43 +02:00
Marc Mueller f149bef9f3
Use assignment expressions 18 (#57967) 2021-10-18 18:36:35 +02:00
Shay Levy cf228e3fe5
Add constructor return type in integrations A-D (#50903) 2021-05-20 18:51:39 +03:00
Marc Mueller 7c0734bdd5
Update typing 05 (#48038) 2021-03-17 23:43:55 +01:00
Philip Allgaier 625bbe6238
Cleanup unused loggers (components A-M) (#41600) 2020-10-12 16:59:05 +02:00
Paulus Schoutsen d1aa0cea97
Move intent registration to own integration (#29280)
* Move intent registration to own integration.

* Lint
2019-12-01 14:12:57 -08:00
Paulus Schoutsen c76f768a82 Make conversation and intent context aware (#28965)
* WIP

* LINT
2019-11-26 11:30:21 +01:00
Paulus Schoutsen fadb6a3979
Add support for conversation ID (#28620) 2019-11-07 12:21:12 -08:00
Paulus Schoutsen a119932ee5
Refactor the conversation integration (#27839)
* Refactor the conversation integration

* Lint
2019-10-18 11:46:45 -07:00