From c9d5baca75f51c81e5dbdd127eecaad95bc4dc10 Mon Sep 17 00:00:00 2001 From: starkillerOG Date: Thu, 9 Mar 2023 11:12:29 +0100 Subject: [PATCH] Add hostname to DHCP discovery title (#89426) --- homeassistant/components/reolink/config_flow.py | 3 +-- homeassistant/components/reolink/strings.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/reolink/config_flow.py b/homeassistant/components/reolink/config_flow.py index e4bc98cc0f8..15f3dfa613e 100644 --- a/homeassistant/components/reolink/config_flow.py +++ b/homeassistant/components/reolink/config_flow.py @@ -95,10 +95,9 @@ class ReolinkFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): await self.async_set_unique_id(mac_address) self._abort_if_unique_id_configured(updates={CONF_HOST: discovery_info.ip}) - short_mac = mac_address[-8:].upper() self.context["title_placeholders"] = { - "short_mac": short_mac, "ip_address": discovery_info.ip, + "hostname": discovery_info.hostname, } self._host = discovery_info.ip diff --git a/homeassistant/components/reolink/strings.json b/homeassistant/components/reolink/strings.json index f4cb8a904ff..3ab77d2b8f4 100644 --- a/homeassistant/components/reolink/strings.json +++ b/homeassistant/components/reolink/strings.json @@ -1,6 +1,6 @@ { "config": { - "flow_title": "{short_mac} ({ip_address})", + "flow_title": "{hostname} ({ip_address})", "step": { "user": { "description": "{error}",