Commit Graph

331 Commits

Author SHA1 Message Date
Simone Chemelli
484a547758 Fix pylance warning on SnapshotAssertion import (#145206) 2025-05-19 13:55:48 +02:00
Odd Stråbø
cc62943835 Fix ESPHome entities unavailable if deep sleep enabled after entry setup (#144970) 2025-05-15 18:57:16 -05:00
J. Nick Koston
301ca88f41 Bump aioesphomeapi to 31.0.1 (#144939) 2025-05-14 22:27:25 -05:00
J. Nick Koston
c76239806d Bump aioesphomeapi to 31.0.0 (#144778)
* aioesphomeapi update

* Bump aioesphomeapi to 31.0.0

There are some breaking changes with the protobuf naming and types
required some refactoring

changelog: https://github.com/esphome/aioesphomeapi/compare/v30.2.0...v31.0.0

* actually include the commit to bump the lib
2025-05-13 20:39:53 -04:00
Marc Mueller
e065f1e097 Update pylint to 3.3.7 + astroid to 3.3.10 (#144630)
* Update pylint to 3.3.7 + astroid to 3.3.10

* Remove unnecessary pylint disable comment
2025-05-11 07:06:42 +02:00
Jesse Hills
bdf4a21976 Use async_release_notes in ESPHome update entity (#144440) 2025-05-08 23:52:43 +02:00
J. Nick Koston
2a5c0d9b88 Add support for updating ESPHome deep sleep devices (#144161)
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2025-05-03 20:50:17 -05:00
J. Nick Koston
b48a2cf2b5 Add tests to ensure ESPHome entity_ids are preserved on upgrade (#144116) 2025-05-03 10:12:37 -05:00
J. Nick Koston
79f8bea48d Avoid validation of ESPHome MAC when discovered entry is ignored or unchanged (#144071)
fixes #144033
fixes #143991
2025-05-01 14:51:38 -04:00
J. Nick Koston
4ee3290929 Improve ESPHome dashboard diagnostics (#143914) 2025-04-30 08:19:16 +02:00
J. Nick Koston
fab70a80bb Quality improvements for the ESPHome dashboard coordinator (#143619) 2025-04-24 23:20:05 +02:00
J. Nick Koston
5a6ce34352 Improve ESPHome test typing (#143617) 2025-04-24 10:41:37 -10:00
J. Nick Koston
3aa1c60fe3 ESPHome quality improvements round 2 (#143613)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2025-04-24 09:51:33 -10:00
J. Nick Koston
01e2c3272b Improve error message when ESPHome reconfigure selects an unexpected device (#143608) 2025-04-24 08:44:02 -10:00
J. Nick Koston
5afcd3e54e Remove the previously deprecated ESPHome assist in progress binary sensor (#143536) 2025-04-24 08:43:48 -10:00
J. Nick Koston
65db3c1164 Fix display issues with ESPHome encryption key steps (#143483) 2025-04-23 18:39:32 +02:00
Paulus Schoutsen
00fc3e2c29 ESPHome Assist Satellite share TTS url in RUN_START (#143460) 2025-04-22 14:22:31 -04:00
J. Nick Koston
849121a124 Improve human-readable name for new/reauth/reconfig in ESPHome (#143302)
* Improve human-readable prompt when requesting ESPHome credentials

Users reported difficulty identifying which device needs reauthentication, especially when names are similar (e.g., `power-meter` vs `power-meter-EEFF`). Previously, only the hostname was shown, which led to confusion. This change includes the config entry title or friendly name—when available—in the prompt to make device identification easier.

* Update homeassistant/components/esphome/config_flow.py

* add missing cover

* tweaks

* one more

* one more

* cover

* some are ``, some are not, make them all ``

* Apply suggestions from code review

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2025-04-21 10:25:14 -04:00
J. Nick Koston
6698b3a1dc Improve ESPHome abort messages for already-configured devices (#143289)
* Improve ESPHome abort messages for already-configured devices

Users often struggle to identify which ESPHome device is already configured—especially when replacing a device or renaming an existing one.
This PR improves the abort messages to include more helpful details, so users can pinpoint the conflicting device without needing to dig through the `core.config_entries` file manually.

* Update homeassistant/components/esphome/strings.json
2025-04-21 09:41:15 -04:00
J. Nick Koston
352ef0d009 Correct handling of entities with empty name for ESPHome devices (#143366)
Correct handling of empty name for ESPHome devices

If the name was set to "", ESPHome should treat this as if the
name is empty. Since protobuf treats empty fields as "" we need
to handle this as `None` internally as otherwise it leads to
friendly names like "Friendly Name " with a trailing space and
unexpected entity_id formats

fixes #132532
2025-04-21 09:38:29 -04:00
Marc Mueller
5843e63878 Add contextmanager to reset logger after set_level call in tests (#143295) 2025-04-20 02:13:01 +02:00
Marc Mueller
8f4435019b Reset logging level in esphome test (#143291) 2025-04-19 23:59:45 +02:00
J. Nick Koston
42c4ed85a1 Remove legacy format exception for ESPHome entity naming (#143049) 2025-04-19 12:41:07 +02:00
J. Nick Koston
3e3697dc7a Add reconfigure support to ESPHome (#143132) 2025-04-19 12:40:07 +02:00
J. Nick Koston
9b1ab34352 Fix hassio mocking in ESPHome dashboard tests (#143212) 2025-04-18 14:11:36 +02:00
J. Nick Koston
6a36fc75cf Fix flakey ESPHome dashboard tests (attempt 2) (#143123)
These tests do not need a config entry, only the integration
to be set up. Since I cannot replicate the issue locally after
1000 runs, I switched it to use async_setup_component to minimize
the potential problem area and hopefully fix the flakey test

I also modified the test to explictly set up hassio to ensure
the patch is effective since we have to patch a late import

last observed flake: https://github.com/home-assistant/core/actions/runs/14503715101/job/40689452294?pr=143106
2025-04-17 08:36:34 +02:00
J. Nick Koston
c32654db18 Add translated exception for ESPHome action call failures (#143067) 2025-04-15 21:19:05 -10:00
J. Nick Koston
f68111c59f Fix flakey ESPHome dashboard setup test (#143057) 2025-04-16 07:59:09 +02:00
J. Nick Koston
ae306893ff Handle name conflicts in ESPHome config flow (#142966) 2025-04-15 08:09:51 -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
8767599ad4 Validate ESPHome mac address before updating IP on discovery (#142878)
* Bump aioesphomeapi to 29.10.0

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

* Validate ESPHome mac address before updating IP on discovery

In some cases the data coming in from discovery may be
stale since there is a small race window if devices
get new IP allocations. Since some routers do not update
their names right away and zeroconf has a non-zero TTL
there is a small window where the discovery data can be
stale. This is a rare condition but it does happen. With
aioesphomeapi 29.10.0+ and ESPHome 2025.4.x+ we can validate
the mac address even without the correct encryption key
which allows us to be able to always validate the MAC
before updating the IP from any discovery method.

* tweaks

* fix test
2025-04-14 10:02:46 +02:00
J. Nick Koston
8bcc4f4c82 Avoid setting up ESPHome dashboard if its been uninstalled (#142904)
* Avoid setting up ESPHome dashboard if its been uninstalled

* tweaks

* coverage

* coverage

* fix
2025-04-14 09:49:21 +02:00
Michael Hansen
28dbf6e3dc Add preannounce boolean for announce/start conversation (#141930)
* Add preannounce boolean

* Fix disabling preannounce in wizard

* Fix casing

* Fix type of preannounce_media_id

* Adjust description of preannounce_media_id
2025-03-31 20:29:07 +02:00
J. Nick Koston
1639163c2e Handle encryption being disabled on an ESPHome device (#141887)
fixes #121442
2025-03-30 21:25:24 -04:00
Paulus Schoutsen
86be626c69 Migrate ESPHome to use token instead of media source ID for legacy Assist Pipelines (#139665)
Migrate legacy ESPHome devices to use TTS token

Co-authored-by: Franck Nijhof <git@frenck.dev>
2025-03-30 16:53:49 +02:00
J. Nick Koston
d4970f81aa Cleanup ESPHome update tests to avoid accessing integration internals (#141786)
We should not access DomainData directly in the test
2025-03-29 22:30:06 -10:00
J. Nick Koston
6d48fc183a Fix ESPHome update entities being loaded before device_info is available (#141704)
* Fix ESPHome update entities being loaded before device_info is available

Since we load platforms when restoring config, the update
platform could be loaded before the connection to the
device was finished which meant device_info could still
be empty. Wait until device_info is available to
load the update platform.

fixes #135906

* Apply suggestions from code review

* move comment

* Update entry_data.py

Co-authored-by: TheJulianJES <TheJulianJES@users.noreply.github.com>

---------

Co-authored-by: TheJulianJES <TheJulianJES@users.noreply.github.com>
2025-03-29 17:53:01 +01:00
J. Nick Koston
ea8392a4a1 Fix ESPHome entities not being removed when the ESPHome config removes an entire platform (#141708)
* Fix old ESPHome entities not being removed when configuration changes

fixes #140756

* make sure all callbacks fire

* make sure all callbacks fire

* make sure all callbacks fire

* make sure all callbacks fire

* revert

* cover
2025-03-29 17:48:51 +01:00
Franck Nijhof
d765936be3 Fix ESPHome event entity staying unavailable (#141650) 2025-03-28 13:55:11 +01:00
Michael Hansen
5eb1d0a28e Add default preannounce sound to Assist satellites (#141522)
* Add default preannounce sound

* Allow None to disable sound

* Register static path instead of HTTP view

* Fix path

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2025-03-26 22:45:28 -05:00
Michael Hansen
220aaf93c6 Add preannounce media id support for ESPHome (#141474)
* Working on preannounce media id support for ESPHome

* Fix test

* Update tests
2025-03-26 11:31:05 -05:00
Michael Hansen
ae18fa2e30 Add start conversation support to ESPHome (#141387) 2025-03-25 13:38:52 -05:00
Paulus Schoutsen
f32bb1a318 Assist satellite to use TTS tokens for announcements (#140336)
* Migrate Assist Satellite to use token

* Fix tests

* Fix tests
2025-03-13 08:36:38 -05:00
J. Nick Koston
d38e046494 Bump bleak-esphome to 2.10.2 (#139731)
* Bump bleak-esphome to 2.10.0

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

* again for wheel fix

* disable name check since its a binary now
2025-03-04 11:49:44 +01:00
J. Nick Koston
4c8a58f7cc Fix broken link in ESPHome BLE repair (#139639)
ESPHome always uses .0 in the URL for the changelog,
and we never had a patch version in the stable
BLE version field so we need to switch it to
.0 for the URL.
2025-03-02 16:50:35 +01:00
Paulus Schoutsen
7293ae5d51 Fix type for ESPHome assist satellite events (#139618) 2025-03-01 22:59:14 -05:00
J. Nick Koston
89b655c192 Fix handling of NaN float values for current humidity in ESPHome (#139600)
fixes #131837
2025-03-01 16:13:04 -06: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
Paulus Schoutsen
90fc6ffdbf Add support for continue conversation in Assist Pipeline (#139480)
* Add support for continue conversation in Assist Pipeline

* Also forward to ESPHome

* Update snapshot

* And mobile app
2025-02-28 13:15:31 -06:00