From a821bec1b40be276c484e0e1a1ea7bb239816fb8 Mon Sep 17 00:00:00 2001 From: Heiko Bauer Date: Fri, 1 Mar 2024 17:35:44 +0100 Subject: [PATCH] disable warnings about insecure requests --- pyproject.toml | 2 +- smart_meter_to_openhab/openhab.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index da9c087..01c1811 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "smart_meter_to_openhab" -version = "0.2.9" +version = "0.2.10" description = "Pushing data of ISKRA MT175 smart meter to openhab" authors = ["Heiko Bauer "] repository = "https://github.com/die-bauerei/smart-meter-to-openhab" diff --git a/smart_meter_to_openhab/openhab.py b/smart_meter_to_openhab/openhab.py index 76c6d4d..ae9c9f9 100644 --- a/smart_meter_to_openhab/openhab.py +++ b/smart_meter_to_openhab/openhab.py @@ -8,6 +8,10 @@ from statistics import median from .interfaces import * +# disable warnings about insecure requests because ssl verification is disabled +import urllib3 +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) + class OpenhabConnection(): def __init__(self, oh_host : str, oh_user : str, oh_passwd : str, logger : Logger) -> None: self._oh_host=oh_host