Pass configured host string instead of always forcing an ip-address (#23164)
* Pass host string instead of forcing an ip-address Pass the configured host (https://www.home-assistant.io/components/homematic/#host) instead of always forcing an ip-address. This is required to get SSL certificate validation working. * Remove unused 'socket' import
This commit is contained in:
parent
723d00d33a
commit
0afa01609c
1 changed files with 2 additions and 3 deletions
|
@ -2,7 +2,6 @@
|
|||
from datetime import timedelta
|
||||
from functools import partial
|
||||
import logging
|
||||
import socket
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -263,7 +262,7 @@ def setup(hass, config):
|
|||
# Create hosts-dictionary for pyhomematic
|
||||
for rname, rconfig in conf[CONF_INTERFACES].items():
|
||||
remotes[rname] = {
|
||||
'ip': socket.gethostbyname(rconfig.get(CONF_HOST)),
|
||||
'ip': rconfig.get(CONF_HOST),
|
||||
'port': rconfig.get(CONF_PORT),
|
||||
'path': rconfig.get(CONF_PATH),
|
||||
'resolvenames': rconfig.get(CONF_RESOLVENAMES),
|
||||
|
@ -279,7 +278,7 @@ def setup(hass, config):
|
|||
|
||||
for sname, sconfig in conf[CONF_HOSTS].items():
|
||||
remotes[sname] = {
|
||||
'ip': socket.gethostbyname(sconfig.get(CONF_HOST)),
|
||||
'ip': sconfig.get(CONF_HOST),
|
||||
'port': DEFAULT_PORT,
|
||||
'username': sconfig.get(CONF_USERNAME),
|
||||
'password': sconfig.get(CONF_PASSWORD),
|
||||
|
|
Loading…
Add table
Reference in a new issue