69 Commits

Author SHA1 Message Date
J. Nick Koston
c32654db18
Add translated exception for ESPHome action call failures (#143067) 2025-04-15 21:19:05 -10:00
J. Nick Koston
9ce44845fe
Add a repair for ESPHome device conflicts (#142507) 2025-04-14 07:10:05 -10:00
J. Nick Koston
a340646e1e
Avoid starting ESPHome reauth when an unexpected device is found at the last address (#142814)
* Bump aioesphomeapi to 29.10.0

changelog: https://github.com/esphome/aioesphomeapi/compare/v29.9.0...v29.10.0

* Avoid starting ESPHome reauth when an unexpected device is found at the last address

fixes #133956

* coverage
2025-04-14 10:10:07 +02:00
J. Nick Koston
8aee79085a
Bump aioesphomeapi to 29.9.0 (#142393)
changelog: https://github.com/esphome/aioesphomeapi/compare/v29.8.0...v29.9.0

fixes #142381
2025-04-06 01:00:41 -10:00
J. Nick Koston
1639163c2e
Handle encryption being disabled on an ESPHome device (#141887)
fixes #121442
2025-03-30 21:25:24 -04:00
J. Nick Koston
ee1fe2cae4
Bump bleak-esphome to 2.9.0 (#139467)
* Bump bleak-esphome to 2.9.0

changelog: https://github.com/Bluetooth-Devices/bleak-esphome/compare/v2.8.0...v2.9.0

* fixes
2025-02-28 16:17:44 -06:00
J. Nick Koston
eb26a2124b
Adjust remote ESPHome log subscription level on logging change (#139308) 2025-02-26 08:58:13 +01:00
J. Nick Koston
81db3dea41
Add option to ESPHome to subscribe to logs (#139073) 2025-02-25 21:56:39 +01:00
J. Nick Koston
39a575dd29
Add missing brackets to ESPHome configuration URLs with IPv6 addresses (#137132)
fixes #137125
2025-02-01 21:02:10 -05:00
J. Nick Koston
d43083e2f9
Set via_device for remote Bluetooth adapters to link to the parent device (#137091) 2025-02-01 12:10:59 -06:00
epenet
a9433ca697
Standardize homeassistant imports in component (e-f) (#136824) 2025-01-29 11:36:22 +01:00
epenet
b43379be7d
Standardize helpers.xxx_registry imports (#136688)
Standardize registry imports
2025-01-28 08:48:34 +01:00
Joost Lekkerkerker
ef8b8fbbaa
Enable RUF023 (#135830) 2025-01-17 12:28:27 +01:00
J. Nick Koston
4e5bf5ac22
Ensure ESPHome cleanups Bluetooth scanner data upon removal (#135470)
* Add bluetooth API to remove scanners that are no longer used

- Cleanup the advertisment history right away when a scanner is removed

In the future we will do some additional cleanup

* coverage

* finish tests

* Ensure ESPHome cleanups Bluetooth scanner data upon removal

needs https://github.com/home-assistant/core/pull/135408
2025-01-12 22:41:49 -05:00
J. Nick Koston
b639466453
Bump bleak-esphome to 2.0.0 (#134580) 2025-01-04 11:30:41 +01:00
Paulus Schoutsen
689260f581
Fix ESPHome dashboard check (#129812) 2024-11-04 17:37:14 +01:00
Jesse Hills
87ab2beddf
Only set ESPHome configuration url to addon if there is an existing configuration for the device (#129356)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-11-03 18:16:49 -06:00
Michael Hansen
c01bdd860a
Unload assist satellite platform on disconnect (#125697) 2024-09-10 20:50:22 -04:00
Paulus Schoutsen
f126a6024e
Migrate ESPHome to assist satellite (#125383)
* Migrate ESPHome to assist satellite

* Address comments
2024-09-06 10:48:42 -04:00
Jesse Hills
e84d9e21f7
Handle single state requests from ESPHome (#124660)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-08-27 12:15:41 -10:00
Erik Montnemery
6bde80ad65
Remove unnecessary assignment of Template.hass from esphome (#123701) 2024-08-12 21:50:23 +02:00
Jesse Hills
bf28419851
Update ESPHome voice assistant pipeline log warning (#123269) 2024-08-07 10:17:01 +02:00
Jesse Hills
21da79a249
Show project version as sw_version in ESPHome (#123183) 2024-08-06 10:11:08 +02:00
J. Nick Koston
c4b277b6ab
Small cleanups to ESPHome manager reconnect shutdown (#120401) 2024-06-25 19:40:04 +02:00
J. Nick Koston
edaa5c60a7
Small cleanups to ESPHome (#120414) 2024-06-25 17:00:03 +02:00
J. Nick Koston
fccb7ea1f9
Migrate ESPHome to use entry.runtime_data (#120402) 2024-06-25 13:10:09 +02:00
J. Nick Koston
dbd3147c9b
Remove async_late_forward_entry_setups and instead implicitly hold the lock (#119088)
* Refactor config entry forwards to implictly obtain the lock instead of explictly

This is a bit of a tradeoff to not need async_late_forward_entry_setups

The downside is we can no longer detect non-awaited plastform setups
as we will always implicitly obtain the lock instead of explictly.

Note, this PR is incomplete and is only for discussion purposes
at this point

* preen

* cover

* cover

* restore check for non-awaited platform setup

* cleanup

* fix missing word

* make non-awaited test safer
2024-06-12 21:06:11 -04:00
J. Nick Koston
ed0568c655
Ensure config entries are not unloaded while their platforms are setting up (#118767)
* Report non-awaited/non-locked config entry platform forwards

Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.

In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.

If config platform forwards are happening during setup, they should be awaited

If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup

* Report non-awaited/non-locked config entry platform forwards

Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.

In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.

If config platform forwards are happening during setup, they should be awaited

If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup

* run with error on to find them

* cert_exp, hold lock

* cert_exp, hold lock

* shelly async_late_forward_entry_setups

* compact

* compact

* found another

* patch up mobileapp

* patch up hue tests

* patch up smartthings

* fix mqtt

* fix esphome

* zwave_js

* mqtt

* rework

* fixes

* fix mocking

* fix mocking

* do not call async_forward_entry_setup directly

* docstrings

* docstrings

* docstrings

* add comments

* doc strings

* fixed all in core, turn off strict

* coverage

* coverage

* missing

* coverage
2024-06-04 21:34:39 -04:00
Jesse Hills
7f530ee0e4
[esphome] Assist timers (#118275)
* [esphome] Assist timers

* Add intent to manifest dependencies

* Add test

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-05-28 14:57:58 -04: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
ca5ed274cb
Deprecate calling async_listen and async_listen_once with run_immediately (#115169) 2024-04-08 10:07:54 -10:00
Marc Mueller
3c5089bc3f
Update import for EventStateChangedData [a-h] (#114899) 2024-04-04 11:48:36 -10:00
J. Nick Koston
bec45dacf0
Add additional coverage to the ESPHome manager (#114265) 2024-03-27 20:52:45 -10:00
J. Nick Koston
dbbd6fff01
Move ESPHome disconnects to the close event (#113652) 2024-03-17 08:15:28 -10:00
J. Nick Koston
4c82196fc8
Avoid some event loop overhead for ESPHome listeners (#113173) 2024-03-12 21:49:31 +01:00
Joost Lekkerkerker
643e6096da
Improve lists in integrations [E-F] (#113075) 2024-03-12 18:42:43 +01:00
J. Nick Koston
f1b5dcdd1b
Refactor handling of device updates in ESPHome (#112864) 2024-03-09 20:30:17 -10:00
Marc Mueller
25237e0377
Replace EventType with Event [a-g] (#112739) 2024-03-08 19:35:17 +01:00
Marc Mueller
0e3945ca6c
Add empty line after module docstring [d-f] (#112698) 2024-03-08 14:15:26 +01:00
J. Nick Koston
4249d17c1b
Reduce ESPHome reconnect time (#112001)
Use eager tasks to request device_info and entities which avoids
waiting one event loop to send the requests to the device
2024-03-01 22:16:01 -05:00
Jesse Hills
e1dade69e1
ESPHome: Pass through wake_word_phrase from on-device microWakeWord (#111585)
* ESPHome: Pass through wake_word_phrase from on-device microWakeWord

* Bump aioesphomeapi to 23.0.0
2024-02-26 23:29:03 -05:00
J. Nick Koston
fd1f712d67
Bump esphome dependencies (#110892) 2024-02-19 10:38:28 +01:00
J. Nick Koston
5bda4be88f
Remove useless _handle_pipeline_event function in ESPHome (#109484) 2024-02-03 14:15:56 +01:00
Michael Hansen
3347a3f8a6
More thorough checks in ESPHome voice assistant UDP server (#109394)
* More thorough checks in UDP server

* Simplify and change to stop_requested

* Check transport
2024-02-02 21:26:44 -05: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
01d0031e09
Fix ESPHome service removal when the device name contains a dash (#107015)
* Fix ESPHome service removal when the device name contains a dash

If the device name contains a dash the service name is mutated to
replace the dash with an underscore, but the remove function did
not do the same mutation so it would fail to remove the service

* add more coverage

* more cover
2024-01-03 19:47:49 -05: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
fc5ae50e06
Bump aioesphomeapi to 19.0.0 (#104512) 2023-11-25 14:00:04 -06:00