319 Commits

Author SHA1 Message Date
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
J. Nick Koston
0afdd9556f
Bump aioesphomeapi to 29.3.1 (#139465) 2025-02-27 21:45:13 +00: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
46599a4ac4
Bump habluetooth to 3.22.0 (#138812) 2025-02-18 23:50:11 -06:00
Erik Montnemery
4b34d1bbb5
Merge config subentry feature branch to dev (#136121)
* Reapply "Add support for subentries to config entries" (#133470) (#136061)

* Reapply "Add support for subentries to config entries" (#133470)

This reverts commit ecb3bf79f32a2e25d141ff467e5958826ed9fc3a.

* Update test snapshot

* Add config subentry support to device registry (#128157)

* Add config subentry support to device registry

* Apply suggestions from code review

* Update syrupy serializer

* Update snapshots

* Address review comments

* Allow a device to be connected to no or a single subentry of a config entry

* Update snapshots

* Revert "Allow a device to be connected to no or a single subentry of a config entry"

This reverts commit ec6f613151cb4a806b7961033c004b71b76510c2.

* Update test snapshots

* Bump release version in comments

* Rename config_subentries to config_entries_subentries

* Add config subentry support to entity registry (#128155)

* Add config subentry support to entity registry

* Update syrupy serializer

* Update snapshots

* Update snapshots

* Accept suggested changes

* Clean registries when removing subentry (#136671)

* Clean up registries when removing subentry

* Update tests

* Clean up subentries from deleted devices when removing config entry (#136669)

* Clean up subentries from deleted devices when removing config entry

* Move

* Add config subentry support to entity platform (#128161)

* Add config subentry support to entity platform

* Rename subentry_id to config_subentry_id

* Store subentry type in subentry (#136687)

* Add reconfigure support to config subentries (#133353)

* Add reconfigure support to config subentries

* Update test

* Minor adjustment

* Rename supported_subentry_flows to supported_subentry_types

* Address review comments

* Add subentry support to kitchen sink (#136755)

* Add subentry support to kitchen sink

* Add subentry reconfigure support to kitchen_sink

* Update kitchen_sink tests with subentry type stored in config entry

* Update kitchen_sink

* Update kitchen_sink

* Adjust kitchen sink tests

* Fix hassfest

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Improve docstrings and strings.json

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-10 16:40:07 +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
b43379be7d
Standardize helpers.xxx_registry imports (#136688)
Standardize registry imports
2025-01-28 08:48:34 +01:00
epenet
af40b6524e
Use new ServiceInfo location in component tests (part 3) (#136064) 2025-01-20 13:16:59 +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
Omni Flux
cf3d4eb26a
Respect ESPHome ClimateTrait supports_current_temperature (#132149) 2024-12-23 11:35:59 +01:00