Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions appdaemon/plugins/hass/hassplugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://developers.home-assistant.io/docs/api/rest>`_.
"""
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(
Expand Down
1 change: 1 addition & 0 deletions docs/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading