diff --git a/lib/pages/routines/widgets/routine_dialogs/water_heater/water_heater_value_selector_widget.dart b/lib/pages/routines/widgets/routine_dialogs/water_heater/water_heater_value_selector_widget.dart index 9d27a53f..d305e5f6 100644 --- a/lib/pages/routines/widgets/routine_dialogs/water_heater/water_heater_value_selector_widget.dart +++ b/lib/pages/routines/widgets/routine_dialogs/water_heater/water_heater_value_selector_widget.dart @@ -28,7 +28,11 @@ class WaterHeaterValueSelectorWidget extends StatelessWidget { Widget build(BuildContext context) { final selectedFn = whFunctions.firstWhere( (f) => f.code == selectedFunction, - orElse: () => throw Exception('Function $selectedFunction not found'), + orElse: () => WHSwitchFunction( + deviceId: '', + deviceName: '', + type: '', + ), ); if (selectedFunction == 'countdown_1') { return Column(