From c64e647d8f81df0d07d818950e9fa88054b90250 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 16 Apr 2025 19:10:59 -1000 Subject: [PATCH] tweaks --- homeassistant/components/esphome/config_flow.py | 5 ++++- homeassistant/components/esphome/strings.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/esphome/config_flow.py b/homeassistant/components/esphome/config_flow.py index 7941af96a5f..ca1b2be3689 100644 --- a/homeassistant/components/esphome/config_flow.py +++ b/homeassistant/components/esphome/config_flow.py @@ -458,13 +458,16 @@ class EsphomeFlowHandler(ConfigFlow, domain=DOMAIN): if self.source == SOURCE_RECONFIGURE: assert self.unique_id is not None assert self._reconfig_entry.unique_id is not None + assert self._host is not None + assert self._device_name is not None if self._reconfig_entry.unique_id != format_mac(self.unique_id): return self.async_abort( reason="reconfigure_unique_id_changed", description_placeholders={ "name": self._reconfig_entry.title, + "host": self._host, "expected_mac": format_mac(self._reconfig_entry.unique_id), - "unexpected_device_name": self._device_name or "", + "unexpected_device_name": self._device_name, "unexpected_mac": format_mac(self.unique_id), }, ) diff --git a/homeassistant/components/esphome/strings.json b/homeassistant/components/esphome/strings.json index 5af7ecb7c3c..88c4ff4cbc3 100644 --- a/homeassistant/components/esphome/strings.json +++ b/homeassistant/components/esphome/strings.json @@ -12,7 +12,7 @@ "mqtt_missing_payload": "Missing MQTT Payload.", "name_conflict_migrated": "The configuration for `{name}` has been migrated to a new device with MAC address `{mac}` from `{existing_mac}`.", "reconfigure_successful": "[%key:common::config_flow::abort::reconfigure_successful%]", - "reconfigure_unique_id_changed": "**Reconfiguration of `{name}` was aborted** because the provided connection settings refer to a different device: `{unexpected_device_name}` (MAC: `{unexpected_mac}`) instead of the expected device (MAC: `{expected_mac}`)." + "reconfigure_unique_id_changed": "**Reconfiguration of `{name}` was aborted** because the address `{host}` points to a different device: `{unexpected_device_name}` (MAC: `{unexpected_mac}`) instead of the expected one (MAC: `{expected_mac}`)." }, "error": { "resolve_error": "Can't resolve address of the ESP. If this error persists, please set a static IP address",