diff --git a/scripts/wk/hw/sensors.py b/scripts/wk/hw/sensors.py index 77cbcfa3..3dc719d7 100644 --- a/scripts/wk/hw/sensors.py +++ b/scripts/wk/hw/sensors.py @@ -158,7 +158,15 @@ class Sensors(): for sources in adapters.values(): for source_data in sources.values(): temps = source_data['Temps'] - source_data[temp_label] = sum(temps) / len(temps) + try: + source_data[temp_label] = sum(temps) / len(temps) + except ZeroDivisionError: + # Going to use unrealistic 0°C instead + LOG.error( + 'No temps saved for %s', + source_data.get('label', 'UNKNOWN'), + ) + source_data[temp_label] = 0 def start_background_monitor( self, out_path,