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: 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.""" 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)