From 33fd2c36c712c546546c537a7b63500b35fb8692 Mon Sep 17 00:00:00 2001 From: virtualdj Date: Sat, 16 Nov 2024 11:20:28 +0000 Subject: [PATCH] Maggior chiarezza nel log --- custom_components/pun_sensor/coordinator.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/custom_components/pun_sensor/coordinator.py b/custom_components/pun_sensor/coordinator.py index 41c8832..72cf8c1 100644 --- a/custom_components/pun_sensor/coordinator.py +++ b/custom_components/pun_sensor/coordinator.py @@ -211,10 +211,18 @@ async def _async_update_data(self): # Logga i dati _LOGGER.debug( "Numero di dati: %s", - ", ".join(str(len(i)) for i in self.pun_data.pun.values()), + ", ".join( + str(f"{len(dati)} ({fascia.value})") + for fascia, dati in self.pun_data.pun.items() + if fascia != Fascia.F23 + ), ) _LOGGER.debug( - "Valori PUN: %s", ", ".join(str(f) for f in self.pun_values.value.values()) + "Valori PUN: %s", + ", ".join( + f"{prezzo} ({fascia.value})" + for fascia, prezzo in self.pun_values.value.items() + ), ) async def update_fascia(self, now=None):