Add homekit configuration option to bind to default interface (#33999)

* Add homekit configuration option to bind to default interface

Homekit can fail to be discoverable because the
zeroconf default is to bind to all interfaces
(InterfaceChoice.All).  This does not work
on some systems and (InterfaceChoice.Default) which
binds to 0.0.0.0 is needed for homekit to zeroconf
to function.

A new option is available for homekit

zeroconf_default_interface: true

* Update tests

* Update homeassistant/components/homekit/__init__.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Update homeassistant/components/homekit/__init__.py

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Review items

* has a default

* Revert "has a default"

This reverts commit 24ecf0920f.

Breaks the tests

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
This commit is contained in:
J. Nick Koston 2020-04-12 09:59:50 -05:00 committed by GitHub
parent fc670e46d9
commit 5aca16ef01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 55 additions and 7 deletions

View file

@ -21,12 +21,14 @@ CONF_FILTER = "filter"
CONF_LINKED_BATTERY_SENSOR = "linked_battery_sensor"
CONF_LOW_BATTERY_THRESHOLD = "low_battery_threshold"
CONF_SAFE_MODE = "safe_mode"
CONF_ZEROCONF_DEFAULT_INTERFACE = "zeroconf_default_interface"
# #### Config Defaults ####
DEFAULT_AUTO_START = True
DEFAULT_LOW_BATTERY_THRESHOLD = 20
DEFAULT_PORT = 51827
DEFAULT_SAFE_MODE = False
DEFAULT_ZEROCONF_DEFAULT_INTERFACE = False
# #### Features ####
FEATURE_ON_OFF = "on_off"