diff --git a/Scripts/temperature_sensor.py b/Scripts/temperature_sensor.py index 1284b2f..e0f60a8 100644 --- a/Scripts/temperature_sensor.py +++ b/Scripts/temperature_sensor.py @@ -62,4 +62,27 @@ class TemperatureSensor: except Exception as e: print(f'Error reading temperatures: {e}') - return results \ No newline at end of file + return results + +# Sensor configuration registry +SENSOR_CONFIG = { + 'inside': { + 'pin': 10, + 'label': 'Inside', + 'alert_high': 80.0, + 'alert_low': 70.0 + }, + 'outside': { + 'pin': 11, + 'label': 'Outside', + 'alert_high': 85.0, + 'alert_low': 68.0 + } +} + +def get_configured_sensors(): + """Return dictionary of configured sensor instances.""" + sensors = {} + for key, config in SENSOR_CONFIG.items(): + sensors[key] = TemperatureSensor(pin=config['pin'], label=config['label']) + return sensors \ No newline at end of file