From 1d3605811ed2355c377260a79662c356b69087a5 Mon Sep 17 00:00:00 2001 From: Johannes Ott Date: Sat, 31 Aug 2024 13:48:24 +0200 Subject: [PATCH] Reduce loglevels Signed-off-by: Johannes Ott --- solaredge2mqtt/services/modbus/__init__.py | 6 +++--- solaredge2mqtt/services/modbus/models.py | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/solaredge2mqtt/services/modbus/__init__.py b/solaredge2mqtt/services/modbus/__init__.py index c9599c1..7079dbe 100644 --- a/solaredge2mqtt/services/modbus/__init__.py +++ b/solaredge2mqtt/services/modbus/__init__.py @@ -114,7 +114,7 @@ def _read_from_modbus( for register_slice in registers.registers_sliced(): - logger.debug( + logger.trace( f"Read {register_slice.registers_length()} registers beginning at {register_slice.registers_start_address() + offset}" ) @@ -126,7 +126,7 @@ def _read_from_modbus( ) if result.isError(): - logger.debug(f"Modbus read error: {result}") + logger.trace(f"Modbus read error: {result}") else: decoder = BinaryPayloadDecoder.fromRegisters( result.registers, @@ -136,7 +136,7 @@ def _read_from_modbus( data = register_slice.payload_decode(decoder, data) except ModbusException as error: - logger.debug(f"Modbus read exception: {error}") + logger.trace(f"Modbus read exception: {error}") return data diff --git a/solaredge2mqtt/services/modbus/models.py b/solaredge2mqtt/services/modbus/models.py index b4bed94..7881022 100644 --- a/solaredge2mqtt/services/modbus/models.py +++ b/solaredge2mqtt/services/modbus/models.py @@ -3,7 +3,6 @@ from influxdb_client import Point from pydantic import Field -from solaredge2mqtt.core.exceptions import InvalidDataException from solaredge2mqtt.core.logging import logger from solaredge2mqtt.core.models import Solaredge2MQTTBaseModel from solaredge2mqtt.services.homeassistant.models import (