* 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>
* 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
* 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
* 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
If the yaml file has invalid utf-8, the config flow would raise an
unhandled exception. Allow the encryption key to be entered manually
in this case instead of a hard failure
fixes#92772
* Handle incorrect or missing device name for ESPHome noise encryption
If we did not have the device name during setup we could never
get the key from the dashboard. The device will send us
its name if we try encryption which allows us to find the
right key from the dashboard.
This should help get users unstuck when they change the key
and cannot get the device back online after deleting and
trying to set it up again manually
* bump lib to get name
* tweak
* reduce number of connections
* less connections when we know we will fail
* coverage shows it works but it does not
* add more coverage
* fix test
* bump again
* 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>
* ESPHome handle remove password and no encryption
* Start reauth for invalid api password
---------
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
* ESPHome: Use MAC as unique ID
* Normalize incoming zeroconf/dhcp macs
* Update comment
* Test ESPHome without mac in zeroconf
* Use format_mac
* Remove unique ID index from DomainData
* ESPHome use dhcp responses to update connection host of known devices
* Add test for dhcp
* Add another test to cover when there are no changes required