From 3aaaad6fcf6c36a324d8281777df40bbf6344834 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Mon, 9 Dec 2024 16:18:19 +0100 Subject: [PATCH] Improve logging --- config.toml | 2 +- oin_thermostat/mqtt.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config.toml b/config.toml index 0c37600..c3b6e80 100644 --- a/config.toml +++ b/config.toml @@ -1,5 +1,5 @@ [logging] -# level = "DEBUG" +level = "INFO" [homeassistant] entity = "climate.chaudiere" diff --git a/oin_thermostat/mqtt.py b/oin_thermostat/mqtt.py index 82ecfc6..b57ff25 100644 --- a/oin_thermostat/mqtt.py +++ b/oin_thermostat/mqtt.py @@ -104,6 +104,7 @@ class HAClient: logger.error("Availability message timed out") return 1 + logger.info("Connected to Home Assistant.") return 0 def publish( @@ -143,6 +144,8 @@ class HAClient: if code != 0: logger.error("MQTT client loop failed with code <{code}>.") + else: + logger.info("MQTT client loop successfully exited") return code def state_update(