Add more HomeKit models for discovery (#24391)
* Add more HomeKit models for discovery * Discover Tradfri with HomeKit * Add Wemo device info * Allow full match for HomeKit model * Fix tests
This commit is contained in:
1 parent
b30f4b8fc0
commit
0dc0706eb2
14 files changed
+118
-19
No files matched your search
@@ -175,6 +175,22 @@ class HueFlowHandler(config_entries.ConfigFlow):
|
||||
'path': 'phue-{}.conf'.format(serial)
|
||||
})
|
||||
|
||||
async def async_step_homekit(self, homekit_info):
|
||||
"""Handle HomeKit discovery."""
|
||||
# pylint: disable=unsupported-assignment-operation
|
||||
host = self.context['host'] = homekit_info.get('host')
|
||||
|
||||
if any(host == flow['context']['host']
|
||||
for flow in self._async_in_progress()):
|
||||
return self.async_abort(reason='already_in_progress')
|
||||
|
||||
if host in configured_hosts(self.hass):
|
||||
return self.async_abort(reason='already_configured')
|
||||
|
||||
return await self.async_step_import({
|
||||
'host': host,
|
||||
})
|
||||
|
||||
async def async_step_import(self, import_info):
|
||||
"""Import a new bridge as a config entry.
|
||||
|
||||
|
||||
@@ -11,6 +11,11 @@
|
||||
"Royal Philips Electronics"
|
||||
]
|
||||
},
|
||||
"homekit": {
|
||||
"models": [
|
||||
"BSB002"
|
||||
]
|
||||
},
|
||||
"dependencies": [],
|
||||
"codeowners": [
|
||||
"@balloob"
|
||||
|
||||
Reference in new issue
Block a user