Skip to content

Weird SSL Issue, SSL: CERTIFICATE_VERIFY_FAILED. (I Found A Temporary Fix.) #101

Description

@justinruck080

Hello, I randomly started getting a SSL Issue. Its a security feature where python checks certs to there hostnames. So I just disabled the check LMAO. I wouldn't use this for a PROD EVN. This file needs to be modified, /config/custom_components/sengledapi/sengledapi/devices/request.py

I used the "File editor", ADD-ON to change the file contents. Its a Browser-based configuration file editor for Home Assistant. Super helpful.

Find This Line:
async with session.post(self._url, headers=self._header, data=self._payload, ssl=sslcontext) as response:
Change the Line To:
async with session.post(self._url, headers=self._header, data=self._payload, ssl=False) as response:

So the whole code should look like this.
https://pastebin.com/x28LkqXg

(GitHub wouldn't cooperate with me pasting it here,, so I just put it in a pastebin.)

If You Want to Switch Back to Secure SSL Later:
Change all instances of ssl=False back to:

ssl=await async_create_ssl_context()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions