Commit Graph

54 Commits

Author SHA1 Message Date
Marc Mueller
2f0dd6f704 Import Generator from collections.abc (2) (#120915) 2024-07-01 11:58:49 +02:00
epenet
e446875c7e Improve type hints in esphome tests (#120674) 2024-06-27 09:33:14 -05:00
Jesse Hills
a93855ded3 [esphome] Add more tests to bring integration to 100% coverage (#120661) 2024-06-27 06:08:40 -05:00
J. Nick Koston
c15718519b Improve test coverage for ESPHome manager (#120400) 2024-06-25 13:14:11 +02:00
epenet
3e9d25f81d Add missing argument type hints to component tests (#119671) 2024-06-14 09:26:46 +02:00
epenet
bfff3c0524 Add type hint to mock_async_zeroconf in test fixtures (#119057) 2024-06-07 12:09:18 +02:00
epenet
f178467b0e Add type hints for TTS test fixtures (#118704) 2024-06-03 17:43:18 +02:00
epenet
83e77720e9 Improve type hints for mock_bluetooth/enable_bluetooth (#118484) 2024-05-30 22:16:45 -04:00
J. Nick Koston
d0f5e40b19 Refactor ESPHome manager to avoid sending signals in tests (#116033) 2024-04-24 16:14:44 +02:00
Jesse Hills
68384bba67 Send/receive Voice Assistant audio via ESPHome native API (#114800)
* Protobuf audio test

* Remove extraneous code

* Rework voice assistant pipeline

* Move variables

* Fix reading flags

* Dont directly put to queue

* Bump aioesphomeapi to 24.0.0

* Update tests

- Add more tests for API pipeline
- Convert some udp tests to use api pipeline
- Update fixtures for new device info flags

* Fix bad merge

---------

Co-authored-by: Michael Hansen <mike@rhasspy.org>
2024-04-09 10:55:59 -04:00
J. Nick Koston
bec45dacf0 Add additional coverage to the ESPHome manager (#114265) 2024-03-27 20:52:45 -10:00
Joost Lekkerkerker
6bb4e7d62c Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Marc Mueller
38adfbf1a3 Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
J. Nick Koston
fd1f712d67 Bump esphome dependencies (#110892) 2024-02-19 10:38:28 +01:00
J. Nick Koston
d588ec8202 Fix ESPHome not fully removing entities when entity info changes (#108823) 2024-01-24 17:29:11 -10:00
J. Nick Koston
d609344f40 Reduce duplicate code in ESPHome connection callback (#107338) 2024-01-08 09:10:58 +01:00
J. Nick Koston
81458dbf6f Add test coverage for ESPHome state subscription (#107045) 2024-01-05 19:51:49 +01:00
J. Nick Koston
9c69212ad5 Add test coverage for ESPHome service calls (#107042) 2024-01-04 09:37:56 +01:00
J. Nick Koston
e2314565bb Fix ESPHome Bluetooth diagnostics (#106151) 2023-12-20 18:33:43 -10: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
J. Nick Koston
89513efd8d Refactor ESPHome Bluetooth connection logic to prepare for esphome-bleak (#105747) 2023-12-17 04:42:28 -10:00
J. Nick Koston
2a80164508 Bump aioesphomeapi to 18.2.4 (#103552) 2023-11-07 11:22:41 +01:00
J. Nick Koston
5b8da03596 Bump aioesphomeapi to 18.0.1 (#102028)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-10-14 23:42:22 -10:00
Joost Lekkerkerker
f1fb28aad5 Use snapshot assertion for ESPHome diagnostics test (#98913) 2023-08-24 01:01:58 +02:00
Marc Mueller
e2d2ec8817 Use asyncio.timeout [b-e] (#98448) 2023-08-15 08:30:20 -05:00
Franck Nijhof
868a5f377f Ruff: isort don't split imports based on trailing comma (#98162) 2023-08-10 14:27:03 +02:00
J. Nick Koston
095146b163 Fix has_entity_name not always being set in ESPHome (#97055) 2023-07-23 10:45:48 +02:00
J. Nick Koston
ffe81a9716 Improve ESPHome update platform error reporting (#96455) 2023-07-12 16:46:29 -10:00
J. Nick Koston
5d5c58338f Fix ESPHome deep sleep devices staying unavailable after unexpected disconnect (#96353) 2023-07-11 11:12:24 -10:00
J. Nick Koston
e38f55fdb6 Move ESPHomeManager into its own file (#95870)
* Move ESPHomeManager into its own file

This is not a functional change. This is only a reorganization
ahead of some more test coverage being added so moving tests
around can be avoided later.

* relos

* fixes

* merge a portion of new cover since its small and allows us to remove the __init__ from .coveragerc
2023-07-08 09:19:44 +02:00
J. Nick Koston
0af71851a4 Fix ESPHome button not getting device updates (#95311) 2023-06-26 22:34:37 -05:00
J. Nick Koston
3b7095c63b Fix esphome not removing entities when static info changes (#95202)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-25 21:31:31 -05:00
J. Nick Koston
85d6e03dd3 Require newly configured esphome device to allow Home Assistant service calls (#95143)
* Require esphome service calls to be enabled

For existing devices, calling Home Assistant services continues
to be allowed.

For newly configured devices, it must now be enabled in the options
flow

* fix

* adjust

* coverage

* adjust

* fix test

* Update homeassistant/components/esphome/strings.json

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

* Update homeassistant/components/esphome/strings.json

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

* Update homeassistant/components/esphome/strings.json

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

* Update homeassistant/components/esphome/__init__.py

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

* Update homeassistant/components/esphome/__init__.py

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update homeassistant/components/esphome/__init__.py

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-25 21:18:21 -04:00
J. Nick Koston
9eedc8a602 Fix esphome binary sensors when state is missing (#95140)
* Fix esphome binary sensors when state is missing

* Fix esphome binary sensors when state is missing

* Fix esphome binary sensors when state is missing
2023-06-24 23:09:26 -04:00
J. Nick Koston
65a5244d5a Fix race and add test coverage for esphome select platform (#95019) 2023-06-22 01:19:47 +02:00
Erik Montnemery
86f2aa84e5 Fix flaky ESPHome test fixture (#94465) 2023-06-12 16:59:11 +02:00
J. Nick Koston
88bfd94800 Add support for ESPHome raw bluetooth advertisements (#94138)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-07 18:36:22 -05:00
Jesse Hills
d7d9143a44 Add speech detection and conversation_id to esphome voice assistant (#93578)
* Add speech detection to esphome voice assistant

* Timeout after silence
Ensure events are sent before finish is called

* use va_version 3 instead of ESPHome version

* Convert repeated fixtures to factory

* Add some v3 tests

* Add conversation_id

* Bump aioesphomeapi to 13.8.0

* Fix missed buffering of detected chunk

* Alter log message

* Updates

* Spelling

* Fix return type
2023-05-30 19:49:22 -04:00
Erik Montnemery
a71c097aeb Revert "Allow setting an entity's name by its device class" (#93539) 2023-05-25 17:20:54 +02:00
Erik Montnemery
67c1051305 Allow setting an entity's name by its device class (#90767)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-05-09 18:55:55 +02:00
Erik Montnemery
f8f7de5d5a Remove homeassistant from conversation dependencies (#92170)
* Remove homeassistant from conversation dependencies

* Fix tests
2023-04-28 18:17:48 +02:00
Jesse Hills
32ed45084a ESPHome voice assistant: Version 2 - Stream raw tts audio back to device for playback (#92052)
* Send raw audio back

* Update tests

* More tests

* Fix docstrings and remove unused patches

* More tests

* MORE

* Only set raw for v2
2023-04-26 22:24:29 -04:00
Jesse Hills
aeb19831d2 ESPHome select for assist pipeline selection (#91526)
* ESPHome: Add assist pipeline select entity

* Add translation strings

* Tests
2023-04-17 22:22:11 -04:00
Jesse Hills
8d201b205f ESPHome binary sensor representing assist pipeline running (#91406)
* ESPHome binary sensor representing assist pipeline running

* Apply suggestions from code review

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

* Rename to call active
Simplify with attrs a little

* Load binary sensor if voice assistant on device

* Add some tests

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-04-17 19:52:37 -04:00
Paulus Schoutsen
98b4a412f7 ESPHome discovered dashboard checks reauth flows (#86993) 2023-01-30 21:32:52 -05:00
Paulus Schoutsen
a83318f373 ESPHome dashboard tweaks (#86176) 2023-01-18 21:15:37 +01:00
Paulus Schoutsen
29337bc6eb Reload ESPHome config entries when dashboard info received (#86174) 2023-01-18 17:59:55 +01:00
Paulus Schoutsen
c8cd41b5d4 Add ESPHome update entities (#85717) 2023-01-11 16:26:13 -05:00
Paulus Schoutsen
06bc9c7b22 Automatically fetch the encryption key from the ESPHome dashboard (#85709)
* Automatically fetch the encryption key from the ESPHome dashboard

* Also use encryption key during reauth

* Typo

* Clean up tests
2023-01-11 15:28:31 -05:00
J. Nick Koston
6b95fa5942 Fix bluetooth not being loaded with esphome proxies when removed from default_config (#85032)
* Fix bluetooth not being loaded with esphome proxies when removed from default_config

fixes #84960

* actually commit the conftest change
2023-01-02 21:10:39 -05:00