Skip to content

Commit

Permalink
Log HomeKit model (#24229)
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob committed Jun 1, 2019
1 parent 9f1dc71 commit 70fe4f2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions homeassistant/components/homekit_controller/config_flow.py
Expand Up @@ -126,14 +126,16 @@ async def async_step_zeroconf(self, discovery_info):
# It changes if a device is factory reset.
hkid = properties['id']
model = properties['md']

name = discovery_info['name'].replace('._hap._tcp.local.', '')
status_flags = int(properties['sf'])
paired = not status_flags & 0x01

_LOGGER.debug("Discovered device %s (%s - %s)", name, model, hkid)

# pylint: disable=unsupported-assignment-operation
self.context['hkid'] = hkid
self.context['title_placeholders'] = {
'name': discovery_info['name'].replace('._hap._tcp.local.', ''),
'name': name,
}

# If multiple HomekitControllerFlowHandler end up getting created
Expand Down

0 comments on commit 70fe4f2

Please sign in to comment.