Commit Graph

492 Commits (e4ef4b81babed74e11798e746edd3998848055c6)

Author SHA1 Message Date
Marc Mueller c82933175d
Use builtin TimeoutError [a-d] (#109678) 2024-02-05 11:31:33 +01:00
Joakim Sørensen f791c77f3b
Bump hass-nabucasa from 0.75.1 to 0.76.0 (#109296) 2024-02-01 11:11:28 +01:00
Erik Montnemery 816c2e9500
Improve enabling of Google local fulfillment (#109192)
* Improve enabling of Google local fulfillment

* Add test

* Improve test coverage
2024-01-31 16:28:27 +01:00
Martin Hjelmare e1576d5998
Handle deprecated cloud tts voice (#109124)
* Handle deprecated cloud tts voice

* Add test

* Fix test logic

* Add breaks in ha version

* Adjust translation string
2024-01-30 21:58:16 +01:00
Martin Hjelmare e086cd9fef
Add cloud tts entity (#108293)
* Add cloud tts entity

* Test test_login_view_missing_entity

* Fix pipeline iteration for migration

* Update tests

* Make migration more strict

* Fix docstring
2024-01-22 17:24:15 +01:00
J. Nick Koston 4b7a313ece
Use identity checks for CoreState (#107846)
Some of the checks used ==, and some used is. Switch
everything to is as its faster
2024-01-12 10:21:26 +01:00
Martin Hjelmare f8318bbbc7
Fix cloud tts loading (#107714) 2024-01-12 09:47:08 +01:00
Marc Mueller fde7a6e9ef
Improve dispatcher typing (#106872) 2024-01-08 09:45:37 +01:00
Robert Resch c063bf403a
Fix mobile_app cloudhook creation (#107068) 2024-01-05 10:53:59 +01:00
Martin Hjelmare e764372d1e
Move cloud binary sensor to config entry (#106409)
* Move cloud binary sensor to config entry

* Fix docstring
2023-12-26 15:12:37 +01:00
Martin Hjelmare e1f31194f7
Move cloud stt engine to config entry (#99608)
* Migrate cloud stt to config entry

* Update default engine

* Test config flow

* Migrate pipelines with cloud stt engine to new engine id

* Fix test after rebase

* Update and add comment

* Remove cloud specifics from default stt engine

* Refactor cloud assist pipeline

* Fix cloud stt entity_id

* Try to wait for platforms before creating default pipeline

* Clean up import

* Move function in cloud assist pipeline

* Wait for tts platform loaded in stt migration

* Update deprecation dates

* Clean up not used fixture

* Add test for async_update_pipeline

* Define pipeline update interface better

* Remove leftover

* Fix tests

* Change default engine test

* Add test for missing stt entity during login

* Add and update comments

* Update config entry title
2023-12-21 13:39:02 +01:00
Ville Skyttä 24b1e01d71
Update Ruff to 0.1.8, avoid linter/formatter conflicts (#106080)
* Disable Ruff rules that may conflict with the formatter

* Upgrade Ruff to 0.1.8

- https://github.com/astral-sh/ruff/releases/tag/v0.1.7
- https://github.com/astral-sh/ruff/releases/tag/v0.1.8

* Format with Ruff 0.1.8
2023-12-20 23:55:09 +01:00
Joakim Sørensen 5b4000e759
Bump hass-nabucasa from 0.74.0 to 0.75.1 (#105958)
* Bump hass-nabucasa from 0.74.0 to 0.75.1

* Force sorting of parametrized test

* Simplify async_create_issue.severity

* use fixtures
2023-12-19 13:08:27 +01:00
Martin Hjelmare 4da04a358a
Refactor cloud assist pipeline (#105723)
* Refactor cloud assist pipeline

* Return None early
2023-12-14 23:56:08 +01:00
Martin Hjelmare 2e448d2d13
Remove cloud details from assist pipeline (#105687)
* Remove cloud details from assist pipeline

* Update assist pipeline tests

* Update cloud tests
2023-12-14 10:15:59 +01:00
Aarni Koskela 706add4a57
Switch formatting from black to ruff-format (#102893)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-27 14:38:59 +01:00
Joakim Sørensen 2859055b36
Add instance id to the cloud integration (#103162) 2023-11-07 23:52:18 +01:00
Michael Hansen ae516ffbb5
Automatically convert TTS audio to MP3 on demand (#102814)
* Add ATTR_PREFERRED_FORMAT to TTS for auto-converting audio

* Move conversion into SpeechManager

* Handle None case for expected_extension

* Only use ATTR_AUDIO_OUTPUT

* Prefer MP3 in pipelines

* Automatically convert to mp3 on demand

* Add preferred audio format

* Break out preferred format

* Add ATTR_BLOCKING to allow async fetching

* Make a copy of supported options

* Fix MaryTTS tests

* Update ESPHome to use "wav" instead of "raw"

* Clean up tests, remove blocking

* Clean up rest of TTS tests

* Fix ESPHome tests

* More test coverage
2023-11-06 15:26:00 -05:00
Joakim Sørensen 267721af43
Bump hass-nabucasa from 0.73.0 to 0.74.0 (#102763) 2023-10-25 11:28:52 +02:00
Joakim Sørensen a0a3d91a28
Update hass-nabucasa from 0.71.0 to 0.73.0 (#101939) 2023-10-13 21:46:52 +02:00
Marc Mueller 0b2b486754
Update mypy to 1.6.0 (#101780) 2023-10-11 13:25:11 +02:00
Jan Bouwhuis c5b32d6307
Add doorbell event to google_assistant (#97123)
* First attempt async_report_state_all

* Move notificationSupportedByAgent to SYNC response

* Make notificationSupportedByAgent conditional

* Add generic sync_options method

* Report event

* Add event_type as ID

* User UUID, imlement query_notifications

* Refactor query_notifications

* Add test

* MyPy

* Unreachable code

* Tweak

* Correct notification message

* Timestamp was wrong unit, it should be in seconds
* Can only allow doorbell class, since it's the only type

* Fix test

* Remove unrelated changes - improve coverage

* Additional tests

---------

Co-authored-by: Joakim Plate <elupus@ecce.se>
2023-09-25 23:20:02 +02:00
Joakim Sørensen 1e2b0b65af
Bump hass-nabucasa from 0.70.0 to 0.71.0 (#100193)
Bump hass-nabucasa from 0.70.0 to 0.71.1
2023-09-12 09:58:25 -04:00
Joakim Sørensen 7042a02d72
Add remote alias to connection info response (#99410) 2023-08-31 10:43:32 -04:00
Joakim Sørensen 8d576c900d
Bump hass-nabucasa from 0.69.0 to 0.70.0 (#98935) 2023-08-24 09:18:25 +02:00
Erik Montnemery 91faa53843
Don't allow hass.config.config_dir to be None (#98442) 2023-08-16 13:00:14 +02:00
Marc Mueller a9ade1f84d
Use asyncio.timeout [core] (#98447) 2023-08-15 08:36:05 -05:00
Jan Bouwhuis 2a48159b69
Alexa typing part 6 (state_report) (#97920)
state_report
2023-08-08 15:46:54 +02:00
Jan Bouwhuis 0614702f98
Alexa typing part 5 (smart_home) (#97918)
* smart_home

* Fix test_disabled

* Remove unused type ignore
2023-08-08 11:48:50 +02:00
Franck Nijhof 5e020ea354
Add is_admin checks to cloud APIs (#97804) 2023-08-08 11:02:42 +02:00
Franck Nijhof e4af293428
Migrate cloud services to support translations (#96319)
* Migrate cloud services to support translations

* Apply suggestions from code review

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-11 23:21:00 +02:00
Joakim Sørensen db01aecb02
Add contents to connection_info handler in cloud client (#95059) 2023-06-27 17:45:41 +02:00
Erik Montnemery f3fc741a71
Bump hass-nabucassa to 0.69.0 (#95367) 2023-06-27 15:29:30 +02:00
Erik Montnemery b600c2cd85
Add cloud_connected method to CloudClient (#91997)
* Add cloud_connected method to CloudClient

* Add cloud_disconnected method

* Update client.py
2023-06-20 17:15:13 +02:00
Erik Montnemery 2bc5198390
Bump hass-nabucassa to 0.68.0 (#94910)
* Bump hass-nabucassa to 0.68.0

* Add implementation of new abstract methods
2023-06-20 13:52:21 +02:00
Erik Montnemery 4802e7f93a
Add debug logs to cloud migration (#94151) 2023-06-07 13:16:23 +02:00
Erik Montnemery 33044bc153
Fix migration of Google Assistant cloud settings (#94148) 2023-06-07 11:14:51 +02:00
Erik Montnemery 1a3d6bbb9a
Fix typo in cloud (#93917) 2023-06-01 15:21:15 +02:00
c0ffeeca7 c3a3ddcfa4
Standardize spelling of TTS and STT (#93857)
* Standardize spelling of TTS and STT

* Apply suggestions from code review

* Update homeassistant/components/tts/media_source.py

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-05-31 11:00:19 -04:00
Erik Montnemery 30d9d7d905
Minor adjustment of tts typing (#93450) 2023-05-24 21:02:55 +02:00
Erik Montnemery 937ebb374c
Enable strict type checks of cloud (#92576)
* Enable strict type checks of cloud

* Fix circular import

* Address review comments

* Apply suggestions from code review
2023-05-24 11:46:11 +02:00
Erik Montnemery 043812bfc3
Bump hass-nabucasa to 0.67.1 (#92484)
* Bump hass-nabucasa to 0.67.1

* Fix typing
2023-05-08 10:51:47 +02:00
Paulus Schoutsen 19dcc8c88f
Re-run expose entities migration if first time failed (#92564)
* Re-run expose entities migration if first time failed

* Count number of exposed entities

* Add tests

---------

Co-authored-by: Erik <erik@montnemery.com>
2023-05-05 08:11:09 -04:00
Erik Montnemery b6664ce367
Improve cloud migration (#92520)
* Improve cloud migration

* Tweak

* Use entity_ids func

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-05-04 23:10:43 -04:00
epenet 628236209b
Fix lingering timer in cloud (#92498) 2023-05-04 19:10:44 +02:00
Erik Montnemery e14be8b0ab
Force migration of cloud settings to exposed_entities (#92499) 2023-05-04 09:53:28 -04:00
Erik Montnemery 78da1168db
Adjust type hints in CloudClient (#92465) 2023-05-04 12:26:52 +02:00
Erik Montnemery a9d8bc989e
Migrate cloud settings for all Google entities (#92416) 2023-05-03 18:56:48 +02:00
Erik Montnemery 51be90d87e
Migrate cloud settings for all Alexa entities (#92413)
* Migrate cloud settings for all Alexa entities

* Also set settings for unknown entities
2023-05-03 12:39:27 -04:00
Erik Montnemery f089f52504
Update cloud WS API for getting entity (#92409)
* Update cloud WS API for getting entity

* Adjust comment
2023-05-03 17:06:42 +02:00
Erik Montnemery b71f98e8b7
Include all entities in cloud lists (#92406) 2023-05-03 16:14:04 +02:00
Erik Montnemery 31de1b17e8
Allow setting google disable 2fa flag on any entity (#92403)
* Allow setting google disable 2fa flag on any entity

* Fix test

* Include disable_2fa flag in cloud/google_assistant/entities/get
2023-05-03 09:55:38 -04:00
Erik Montnemery 4860a8d1e8
Don't use storage collection helper in ExposedEntities (#92396)
* Don't use storage collection helper in ExposedEntities

* Fix tests
2023-05-03 12:39:22 +02:00
Erik Montnemery e3c16e634b
Allow exposing entities not in the entity registry to assistants (#92363) 2023-05-02 22:08:09 +02:00
Erik Montnemery ec1ae7e2df
Remove homeassistant from cloud dependencies (#92169) 2023-04-28 14:27:06 +02:00
Erik Montnemery 2522c6d697
Add WS command cloud/alexa/entities/get (#92121)
* Add WS command cloud/alexa/entities/get

* Fix bugs, add test
2023-04-27 17:10:29 +02:00
Erik Montnemery 7215f6320e
Avoid exposing unsupported entities to Alexa (#92107)
* Avoid exposing unsupported entities to Alexa

* Update homeassistant/components/cloud/alexa_config.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-04-27 13:31:24 +02:00
Erik Montnemery 65c9d4a4ae
Avoid exposing unsupported entities to Google Assistant (#92105)
* Avoid exposing unsupported entities to Google Assistant

* Add Google Assistant specific support sets

* Add test
2023-04-27 10:38:21 +02:00
Erik Montnemery 904ce226fb
Tweak response of /api/cloud/login (#92058) 2023-04-26 15:28:08 +02:00
Erik Montnemery 2750a5c3e6
Make assist_pipeline an after dependency of cloud (#92057) 2023-04-26 13:45:32 +02:00
Erik Montnemery ed737f306b
Remove cloud assist pipeline setup from cloud client (#92056) 2023-04-26 06:53:58 -04:00
Joakim Sørensen c429bfae3e
Bump hass-nabucasa from 0.66.1 to 0.66.2 (#92054) 2023-04-26 10:47:41 +02:00
Erik Montnemery 57a59d808b
Automaticially create an assist pipeline using cloud stt + tts (#91991)
* Automaticially create an assist pipeline using cloud stt + tts

* Return the id of the cloud enabled pipeline

* Wait for platforms to load

* Fix typing

* Fix startup race

* Update tests

* Create a cloud pipeline only when logging in

* Fix tests

* Tweak _async_resolve_default_pipeline_settings

* Improve assist_pipeline test coverage

* Improve cloud test coverage
2023-04-25 20:40:01 -05:00
Joakim Sørensen 083f42cce6
Bump hass-nabucasa from 0.65.0 to 0.66.1 (#92020) 2023-04-25 21:00:23 +02:00
Erik Montnemery 933761d425
Fix cloud connected signal only firing once (#92009) 2023-04-25 12:15:27 -04:00
Paulus Schoutsen 1eef4af493
Use configured voice in TTS output for assist pipeline (#91878) 2023-04-22 22:01:32 -04:00
Erik Montnemery 9a0de43f98
Add name to tts voices (#91814)
* Add name to tts voices

* Add new file
2023-04-21 20:41:14 -04:00
Erik Montnemery f3e6d6dfc0
Add async_get_supported_voices to tts.Provider (#91649)
* Add async_get_supported_voices to tts.Provider

* Update WS API
2023-04-19 13:47:49 +02:00
Paulus Schoutsen f3897d8dae
Bump hass-nabucasa to 0.65.0 (#91565) 2023-04-18 08:42:03 -04:00
Joakim Sørensen 2c8b704a6d
Add certificate status for cloud remote (#91277) 2023-04-13 00:38:32 +02:00
Joakim Sørensen 8ce17458a9
Bump hass-nabucasa from 0.63.1 to 0.64.1 (#91271) 2023-04-12 12:38:57 +02:00
epenet 9705607db4
Fix lingering timer in cloud (#90822)
* Fix lingering timer in cloud

* Rename variable

* Improve

* Improve again

* Adjust

* Adjust

* Add property to HassJob instead

* Adjust

* Rename

* Adjust

* Adjust

* Make it read-only

* Add specific test
2023-04-07 11:38:17 +02:00
Erik Montnemery 44c89a6b6c
Refactor handling of exposed entities for cloud Alexa and Google (#89877)
* Refactor handling of exposed entities for cloud Alexa

* Tweak WS API

* Validate assistant parameter

* Address some review comments

* Refactor handling of exposed entities for cloud Google

* Raise when attempting to expose an unknown entity

* Add tests

* Adjust cloud tests

* Allow getting expose new entities flag

* Test Alexa migration

* Test Google migration

* Add WS command cloud/google_assistant/entities/get

* Fix return value

* Update typing

* Address review comments

* Rename async_get_exposed_entities to async_get_assistant_settings
2023-04-06 13:09:45 -04:00
Paulus Schoutsen 86e9f6643f
Allow TTS requests to resolve in the background (#90944) 2023-04-06 10:42:55 -05:00
Joakim Sørensen d907bd2ca3
Add connected relayer region to system health (#90410) 2023-03-28 17:09:59 +02:00
Paulus Schoutsen c3717f8182
Clean up voice assistant integration (#90239)
* Clean up voice assistant

* Reinstate auto-removed imports

* Resample STT audio from 44.1Khz to 16Khz

* Energy based VAD for prototyping

---------

Co-authored-by: Michael Hansen <mike@rhasspy.org>
2023-03-26 21:41:17 -05:00
Michael Hansen 3e3ece4e56
Add speech to text over binary websocket to pipeline (#90082)
* Allow passing binary to the WS connection

* Expand test coverage

* Test non-existing handler

* Add text to speech and stages to pipeline

* Default to "cloud" TTS when engine is None

* Refactor pipeline request to split text/audio

* Refactor with PipelineRun

* Generate pipeline from language

* Clean up

* Restore TTS code

* Add audio pipeline test

* Clean TTS cache in test

* Clean up tests and pipeline base class

* Stop pylint and pytest magics from fighting

* Include mock_get_cache_files

* Working on STT

* Preparing to test

* First successful test

* Send handler_id

* Allow signaling end of stream using empty payloads

* Store handlers in a list

* Handle binary handlers raising exceptions

* Add stt/tts dependencies to voice_assistant

* Include STT audio in pipeline test

* Working on tests

* Refactoring with stages

* Fix tests

* Add more tests

* Add method docs

* Change stt demo/cloud to AsyncIterable

* Add pipeline error events

* Move handler id to separate message before pipeline

* Add test for invalid stage order

* Change "finish" to "end"

* Use enum

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-03-23 14:44:19 -04:00
Paulus Schoutsen 9b9ed21dc4
Update hass-nabucasa to 0.62.0 (#90085) 2023-03-22 13:24:28 +01:00
Martin Hjelmare f4de050904
Bump hass-nabucasa to 0.61.1 (#89864) 2023-03-17 13:27:05 +01:00
epenet 81c0382e4b
Fix lingering timer in bootstrap tests (#89790)
* Fix lingering timer in bootstrap test

* Adjust comment

* Use a constant
2023-03-16 17:20:27 -04:00
Erik Montnemery f55aaf7664
Drop unused Google entity settings from cloud (#89786) 2023-03-16 11:15:38 +01:00
J. Nick Koston 85b852d8ad
Fix cloud integration with py3.11 (#88088)
In py3.11 `Passing coroutines is forbidden, use tasks explicitly`
2023-02-14 11:31:52 -05:00
Erik Montnemery cc564026fa
Move EntityCategory to homeassistant.const (#87792)
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
Erik Montnemery 87420e949d
Sort manifests 2 (#87023) 2023-02-08 20:16:39 +01:00
Franck Nijhof 939eef3b28
Remove translations from Core (#87543)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-02-06 15:06:43 +01:00
Franck Nijhof ca1a12898c
Enable Ruff D212 (#87347) 2023-02-03 23:08:48 +01:00
epenet b03f4fa1d3
Improve type hints in cloud (#87263) 2023-02-03 17:10:25 +01:00
epenet 810367b757
Fix `can not` typo (#87254) 2023-02-03 11:37:16 +01:00
Franck Nijhof c56832bb2c
Enable Ruff SIM300 (#86793) 2023-01-30 11:03:23 +01:00
GitHub Action 77f9548e51 [ci skip] Translation update 2023-01-15 00:25:52 +00:00
GitHub Action dffc913f9e [ci skip] Translation update 2023-01-14 00:22:57 +00:00
Franck Nijhof b0cee0bc46
String formatting and max line length - Part 1 (#84390)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-12-22 10:12:50 +01:00
Joakim Sørensen 63807e443a
Skip client metadata values that are None (#84293) 2022-12-20 09:32:27 -05:00
GitHub Action cfa08c5229 [ci skip] Translation update 2022-12-15 00:24:38 +00:00
Erik Montnemery d2fc3a22e2
Drop title from repairs flows (#83627) 2022-12-10 11:43:22 +01:00
GitHub Action 3de8185506 [ci skip] Translation update 2022-12-08 00:21:50 +00:00
Joakim Sørensen f5cfd0329c
Use the async_migrate_paypal_agreement function to get the migration URL (#83469)
* Use the async_migrate_paypal_agreement function to get the migration URL

* Update URL

* Handle timeout error
2022-12-07 12:02:22 -07:00
Joakim Sørensen 8ed6fcd58e
When an account exist without a subscription "provider" will not exist (#83472) 2022-12-07 16:48:34 +01:00
Joakim Sørensen 41e4f10977
Bump hass-nabucasa from 0.59.0 to 0.61.0 (#83466) 2022-12-07 13:17:45 +01:00
GitHub Action 1f3e5fb4fc [ci skip] Translation update 2022-12-07 00:24:08 +00:00