Add hostname to DHCP discovery title (#89426)

pull/85977/head
starkillerOG 2023-03-09 11:12:29 +01:00 committed by GitHub
parent 5828e9a8d2
commit c9d5baca75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -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

View File

@ -1,6 +1,6 @@
{
"config": {
"flow_title": "{short_mac} ({ip_address})",
"flow_title": "{hostname} ({ip_address})",
"step": {
"user": {
"description": "{error}",