mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Log HomeKit model (#24229)
This commit is contained in:
parent
9f1dc71320
commit
70fe4f22db
@ -126,14 +126,16 @@ class HomekitControllerFlowHandler(config_entries.ConfigFlow):
|
|||||||
# It changes if a device is factory reset.
|
# It changes if a device is factory reset.
|
||||||
hkid = properties['id']
|
hkid = properties['id']
|
||||||
model = properties['md']
|
model = properties['md']
|
||||||
|
name = discovery_info['name'].replace('._hap._tcp.local.', '')
|
||||||
status_flags = int(properties['sf'])
|
status_flags = int(properties['sf'])
|
||||||
paired = not status_flags & 0x01
|
paired = not status_flags & 0x01
|
||||||
|
|
||||||
|
_LOGGER.debug("Discovered device %s (%s - %s)", name, model, hkid)
|
||||||
|
|
||||||
# pylint: disable=unsupported-assignment-operation
|
# pylint: disable=unsupported-assignment-operation
|
||||||
self.context['hkid'] = hkid
|
self.context['hkid'] = hkid
|
||||||
self.context['title_placeholders'] = {
|
self.context['title_placeholders'] = {
|
||||||
'name': discovery_info['name'].replace('._hap._tcp.local.', ''),
|
'name': name,
|
||||||
}
|
}
|
||||||
|
|
||||||
# If multiple HomekitControllerFlowHandler end up getting created
|
# If multiple HomekitControllerFlowHandler end up getting created
|
||||||
|
Loading…
x
Reference in New Issue
Block a user