From 1ca2e5226be3e8ecb5c9125601594dc7e0f56b78 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 30 Sep 2018 21:36:27 +0200 Subject: [PATCH 1/3] Fix MQTT certificates (#16999) --- homeassistant/components/mqtt/__init__.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/mqtt/__init__.py b/homeassistant/components/mqtt/__init__.py index 70f20453633..874f21e5168 100644 --- a/homeassistant/components/mqtt/__init__.py +++ b/homeassistant/components/mqtt/__init__.py @@ -424,25 +424,22 @@ async def async_setup_entry(hass, entry): keepalive = conf[CONF_KEEPALIVE] username = conf.get(CONF_USERNAME) password = conf.get(CONF_PASSWORD) + certificate = conf.get(CONF_CERTIFICATE) client_key = conf.get(CONF_CLIENT_KEY) client_cert = conf.get(CONF_CLIENT_CERT) tls_insecure = conf.get(CONF_TLS_INSECURE) protocol = conf[CONF_PROTOCOL] # For cloudmqtt.com, secured connection, auto fill in certificate - if (conf.get(CONF_CERTIFICATE) is None and - 19999 < conf[CONF_PORT] < 30000 and - conf[CONF_BROKER].endswith('.cloudmqtt.com')): + if (certificate is None and 19999 < conf[CONF_PORT] < 30000 and + broker.endswith('.cloudmqtt.com')): certificate = os.path.join( os.path.dirname(__file__), 'addtrustexternalcaroot.crt') # When the certificate is set to auto, use bundled certs from requests - elif conf.get(CONF_CERTIFICATE) == 'auto': + elif certificate == 'auto': certificate = requests.certs.where() - else: - certificate = None - if CONF_WILL_MESSAGE in conf: will_message = Message(**conf[CONF_WILL_MESSAGE]) else: From d09ee8ac827c77a3eb3326340700742e770ff2a1 Mon Sep 17 00:00:00 2001 From: Rohan Kapoor Date: Mon, 1 Oct 2018 01:53:20 -0700 Subject: [PATCH 2/3] Fix switch.zoneminder name (#17026) --- homeassistant/components/switch/zoneminder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/switch/zoneminder.py b/homeassistant/components/switch/zoneminder.py index 265f94fbbb1..c28fe843b90 100644 --- a/homeassistant/components/switch/zoneminder.py +++ b/homeassistant/components/switch/zoneminder.py @@ -57,7 +57,7 @@ class ZMSwitchMonitors(SwitchDevice): @property def name(self): """Return the name of the switch.""" - return '{}\'s State'.format(self._monitor.name) + return '{} State'.format(self._monitor.name) def update(self): """Update the switch value.""" From 33a54043e91cd6404dd6806e96a1761bd84cb823 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 1 Oct 2018 15:08:56 +0200 Subject: [PATCH 3/3] Bumped version to 0.79.2 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index 31e05c2c86b..6ae08af5047 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -2,7 +2,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 79 -PATCH_VERSION = '1' +PATCH_VERSION = '2' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 5, 3)