diff --git a/cara/apps/expert.py b/cara/apps/expert.py index 664f97b3..ef19f8c4 100644 --- a/cara/apps/expert.py +++ b/cara/apps/expert.py @@ -434,7 +434,7 @@ class ModelWidgets(View): widget.layout.visible = False ventilation_w = widgets.ToggleButtons( - options=ventilation_widgets.keys(), + options=['Natural', 'Mechanical', 'No ventilation'] ) def toggle_ventilation(value): @@ -532,6 +532,7 @@ class CARAStateBuilder(state.StateBuilder): states={ 'Natural': self.build_generic(models.WindowOpening), 'Mechanical': self.build_generic(models.HVACMechanical), + 'No ventilation': self.build_generic(models.AirChange), }, state_builder=self, ) @@ -539,6 +540,10 @@ class CARAStateBuilder(state.StateBuilder): s._states['Mechanical'].dcs_update_from( models.HVACMechanical(models.PeriodicInterval(period=24*60, duration=24*60), 500.) ) + # Initialise the No ventilation state + s._states['No ventilation'].dcs_update_from( + models.AirChange(active=models.PeriodicInterval(period=120, duration=120), air_exch=0.) + ) return s