config: wire TempSensor section from config.json to TempSensorSim

PlantFactory.create() now accepts sensor_config dict; extracts type and
kwargs, falls back to sigma=0.05/temp_offset=-0.15 defaults. brewpi.py
passes config.get('TempSensor', {}). Templates updated with full
TempSensor sections.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-30 19:27:04 +02:00
co-authored by Claude Sonnet 4.6
parent ca1953c9ee
commit 0156e689ca
4 changed files with 24 additions and 6 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ if __name__ == '__main__':
# (the modeled plant)/TempSensorSim; anything else gets HeaterHendi/
# PotReal (no model - the real kettle does its own physics)/
# TempSensor_max31865.
heater, pot, sensor = PlantFactory.create(config['Controller']['plant_name'], DT, config['Heater'])
heater, pot, sensor = PlantFactory.create(config['Controller']['plant_name'], DT, config['Heater'], config.get('TempSensor', {}))
sensor_task = TempSensorTask(sensor, DT_TASK, dispatcher.msgio_get("Sensor"))
taskmgr.add(sensor_task)