Skip to content

Commit

Permalink
Homematic: Add optional port for resolvenames via JSON (home-assistan…
Browse files Browse the repository at this point in the history
…t#15029)

* Add optional JSON port
  • Loading branch information
hanzoh authored and danielperna84 committed Jun 21, 2018
1 parent 6cabbd2 commit 8c2f0e3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions homeassistant/components/homematic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,15 @@
CONF_CALLBACK_IP = 'callback_ip'
CONF_CALLBACK_PORT = 'callback_port'
CONF_RESOLVENAMES = 'resolvenames'
CONF_JSONPORT = 'jsonport'
CONF_VARIABLES = 'variables'
CONF_DEVICES = 'devices'
CONF_PRIMARY = 'primary'

DEFAULT_LOCAL_IP = '0.0.0.0'
DEFAULT_LOCAL_PORT = 0
DEFAULT_RESOLVENAMES = False
DEFAULT_JSONPORT = 80
DEFAULT_PORT = 2001
DEFAULT_PATH = ''
DEFAULT_USERNAME = 'Admin'
Expand All @@ -178,6 +180,7 @@
vol.Optional(CONF_PATH, default=DEFAULT_PATH): cv.string,
vol.Optional(CONF_RESOLVENAMES, default=DEFAULT_RESOLVENAMES):
vol.In(CONF_RESOLVENAMES_OPTIONS),
vol.Optional(CONF_JSONPORT, default=DEFAULT_JSONPORT): cv.port,
vol.Optional(CONF_USERNAME, default=DEFAULT_USERNAME): cv.string,
vol.Optional(CONF_PASSWORD, default=DEFAULT_PASSWORD): cv.string,
vol.Optional(CONF_CALLBACK_IP): cv.string,
Expand Down Expand Up @@ -299,6 +302,7 @@ def setup(hass, config):
'port': rconfig.get(CONF_PORT),
'path': rconfig.get(CONF_PATH),
'resolvenames': rconfig.get(CONF_RESOLVENAMES),
'jsonport': rconfig.get(CONF_JSONPORT),
'username': rconfig.get(CONF_USERNAME),
'password': rconfig.get(CONF_PASSWORD),
'callbackip': rconfig.get(CONF_CALLBACK_IP),
Expand Down

0 comments on commit 8c2f0e3

Please sign in to comment.