Co-authored-by: Ruslan Sayfutdinov <ruslan@sayfutdinov.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
We plan on matching with _airplay which means we need
to able to limit to specific manufacturers to avoid
generating flows for integrations with the wrong
manufacturer
* Refactor zeroconf setup to be async
Most of the setup was calling back to async because
we were setting up listeners. Since we only need
to jump into the executor to create the zeroconf
instance, its much faster to setup in async.
In testing this cut the setup time in half
or better.
* partial revert to after_deps
If a device on the network presented a bad name, zeroconf
would throw zeroconf.BadTypeInNameException and the service
browser would die off. We now trap the exception and continue.
* Ensure we do not start discovered flows until after the start event has fired
This change makes zeroconf and ssdp match discovery behavior of not
creating config flows until the start event has been fired. This
prevents config flow creation/dependency installs for discovered
config flows from competing for cpu time during startup.
* Start discovery/service browser/ssdp when EVENT_HOMEASSISTANT_STARTED is fired instead of EVENT_HOMEASSISTANT_START
* Ensure homekit_controller recieves zeroconf c# updates
If an integration has a homekit config flow step
homekit controller would not see updates for
devices that were paired with it and would not
rescan for changes.
* Only send updates to homekit controller if the device is paired
This avoids the device showing up a second time.
* remove debug
* fix refactor error
Each ServerBrowser currently runs in its own thread which
processes every A or AAAA record update per instance.
As the list of zeroconf names we watch for grows, each additional
ServiceBrowser would process all the A and AAAA updates on the network.
To avoid overwhemling the system we pre-filter here and only process
DNSPointers for the configured record name (type)
* Allow async_setup changes to config entry data be taken into account
* Fix tests
* Limit scope try…finally
* Update tests/test_config_entries.py
Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
* Fix import
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Config flow for doorbird
* Discoverable via zeroconf
* Fix zeroconf test
* add missing return
* Add a test for legacy over ride url (will go away when refactored to cloud hooks)
* Update homeassistant/components/doorbird/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* without getting the hooks its not so useful
* Update homeassistant/components/doorbird/config_flow.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* fix copy pasta
* remove identifiers since its in connections
* self review fixes
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* enhance zeroconf service info decoding to include raw bytes
* Update homeassistant/components/zeroconf/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* fix test based on last commit
* fix test based on last commit
* remove .keys() when asserting processed and raw service info properties
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* use isort to sort imports for components starting with 'z'
* add skip to end of zha/core/channels/__init__.py
* put 'pylint: disable=import-error' at the right place
* remove the import of config_flow in zha/__init__.py
According to @balloob it is no longer needed.
* revert previous commit
* isort:skip homeassistant/components/zha/__init__.py completely