mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 08:17:08 +00:00
Add hostname to DHCP discovery title (#89426)
This commit is contained in:
parent
5828e9a8d2
commit
c9d5baca75
@ -95,10 +95,9 @@ class ReolinkFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
await self.async_set_unique_id(mac_address)
|
await self.async_set_unique_id(mac_address)
|
||||||
self._abort_if_unique_id_configured(updates={CONF_HOST: discovery_info.ip})
|
self._abort_if_unique_id_configured(updates={CONF_HOST: discovery_info.ip})
|
||||||
|
|
||||||
short_mac = mac_address[-8:].upper()
|
|
||||||
self.context["title_placeholders"] = {
|
self.context["title_placeholders"] = {
|
||||||
"short_mac": short_mac,
|
|
||||||
"ip_address": discovery_info.ip,
|
"ip_address": discovery_info.ip,
|
||||||
|
"hostname": discovery_info.hostname,
|
||||||
}
|
}
|
||||||
|
|
||||||
self._host = discovery_info.ip
|
self._host = discovery_info.ip
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"config": {
|
"config": {
|
||||||
"flow_title": "{short_mac} ({ip_address})",
|
"flow_title": "{hostname} ({ip_address})",
|
||||||
"step": {
|
"step": {
|
||||||
"user": {
|
"user": {
|
||||||
"description": "{error}",
|
"description": "{error}",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user