diff --git a/appdaemon/plugins/hass/hassplugin.py b/appdaemon/plugins/hass/hassplugin.py index 119a4593b..8ea662fe6 100644 --- a/appdaemon/plugins/hass/hassplugin.py +++ b/appdaemon/plugins/hass/hassplugin.py @@ -121,11 +121,8 @@ def create_session(self) -> aiohttp.ClientSession: """Handles creating an :py:class:`~aiohttp.ClientSession` with the cert information from the plugin config and the authorization headers for the `REST API `_. """ - if self.config.cert_path is not None: - ssl_context = ssl.create_default_context(capath=self.config.cert_path) - conn = aiohttp.TCPConnector(ssl_context=ssl_context, verify_ssl=self.config.cert_verify) - else: - conn = aiohttp.TCPConnector(ssl=False) + ssl_context = ssl.create_default_context(capath=self.config.cert_path) + conn = aiohttp.TCPConnector(ssl_context=ssl_context) connect_timeout_secs = self.config.connect_timeout.total_seconds() return aiohttp.ClientSession( diff --git a/docs/HISTORY.md b/docs/HISTORY.md index 5d41fdbac..7ac94e93d 100644 --- a/docs/HISTORY.md +++ b/docs/HISTORY.md @@ -10,6 +10,7 @@ - Fix for sunrise and sunset with offsets - contributed by [ekutner](https://github.com/ekutner) - Fix for random MQTT disconnects - contributed by [Xsandor](https://github.com/Xsandor) +- Fix for connecting to Home Assistant with https - Fix for persistent namespaces in Python 3.12 - Better error handling for receiving huge websocket messages in the Hass plugin