@@ -126,8 +126,8 @@ def _parse_dt(value: Any) -> Optional[dt_util.dt.datetime]:
126126 if ts > 1_000_000_000_000 : # ms epoch
127127 ts = ts / 1000.0
128128 return dt_util .dt .datetime .fromtimestamp (ts , tz = dt_util .UTC )
129- except Exception :
130- pass
129+ except Exception as err :
130+ _LOGGER . debug ( "Failed to parse numeric timestamp '%s': %s" , value , err )
131131 dt = dt_util .parse_datetime (value )
132132 if dt is None :
133133 try :
@@ -325,8 +325,8 @@ async def async_start(self) -> None:
325325 ):
326326 snap = self .telemetry_store .get_snapshot ()
327327 self .coordinator .async_set_updated_data (snap .payload )
328- except Exception :
329- pass
328+ except Exception as err :
329+ _LOGGER . debug ( "Failed to seed local telemetry snapshot: %s" , err )
330330
331331 # Watch proxy last_data changes
332332 if _async_track_state_change_event is not None :
@@ -369,8 +369,8 @@ async def async_stop(self) -> None:
369369 for unsub in self ._unsubs :
370370 try :
371371 unsub ()
372- except Exception :
373- pass
372+ except Exception as err :
373+ _LOGGER . debug ( "Failed to unsubscribe data source listener: %s" , err )
374374 self ._unsubs .clear ()
375375
376376 @callback
@@ -396,8 +396,8 @@ def _on_any_state_change(self, event: Any) -> None:
396396 state = get_data_source_state (self .hass , self .entry .entry_id )
397397 if state .effective_mode == DATA_SOURCE_CLOUD_ONLY :
398398 return
399- except Exception :
400- pass
399+ except Exception as err :
400+ _LOGGER . debug ( "Failed to read data source state: %s" , err )
401401
402402 entity_id = event .data .get ("entity_id" )
403403 if not isinstance (entity_id , str ):
@@ -444,8 +444,8 @@ def _on_any_state_change(self, event: Any) -> None:
444444 def _schedule_debounced_poke (self ) -> None :
445445 try :
446446 self .hass .async_create_task (self ._debouncer .async_call ())
447- except Exception :
448- pass
447+ except Exception as err :
448+ _LOGGER . debug ( "Failed to schedule local telemetry debounce: %s" , err )
449449
450450 async def _handle_local_event (self ) -> None :
451451 """Debounced handler for local telemetry changes.
@@ -469,8 +469,8 @@ async def _handle_local_event(self) -> None:
469469 ):
470470 snap = self .telemetry_store .get_snapshot ()
471471 self .coordinator .async_set_updated_data (snap .payload )
472- except Exception :
473- pass
472+ except Exception as err :
473+ _LOGGER . debug ( "Failed to handle local telemetry event: %s" , err )
474474
475475 @callback
476476 def _update_state (self , force : bool = False ) -> tuple [bool , bool ]:
@@ -611,19 +611,19 @@ def _on_effective_mode_changed(self) -> None:
611611 "reason" : state .reason ,
612612 },
613613 )
614- except Exception :
615- pass
614+ except Exception as err :
615+ _LOGGER . debug ( "Failed to fire data source change event: %s" , err )
616616
617617 if state .effective_mode == DATA_SOURCE_CLOUD_ONLY :
618618 # Ensure cloud data is fresh when falling back
619619 try :
620620 self .hass .async_create_task (self .coordinator .async_request_refresh ())
621- except Exception :
622- pass
621+ except Exception as err :
622+ _LOGGER . debug ( "Failed to schedule coordinator refresh: %s" , err )
623623
624624 async def _poke_coordinator (self ) -> None :
625625 try :
626626 if self .coordinator and getattr (self .coordinator , "data" , None ) is not None :
627627 self .coordinator .async_set_updated_data (self .coordinator .data )
628- except Exception :
629- pass
628+ except Exception as err :
629+ _LOGGER . debug ( "Failed to poke coordinator: %s" , err )
0 commit comments