fix: Update response handling to redirect to homepage after mode actions
This commit is contained in:
parent
a0fe76abc4
commit
b8336f82c8
@ -118,8 +118,9 @@ class TempWebServer:
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
return self._get_status_page(sensors, ac_monitor, heater_monitor, show_success=True)
|
# Redirect back to homepage
|
||||||
|
return 'HTTP/1.1 303 See Other\r\nLocation: /\r\n\r\n'
|
||||||
|
|
||||||
elif mode_action == 'temporary_hold':
|
elif mode_action == 'temporary_hold':
|
||||||
# Enter temporary hold (pause schedules temporarily)
|
# Enter temporary hold (pause schedules temporarily)
|
||||||
config['schedule_enabled'] = False
|
config['schedule_enabled'] = False
|
||||||
@ -137,7 +138,8 @@ class TempWebServer:
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
return self._get_status_page(sensors, ac_monitor, heater_monitor, show_success=True)
|
# Redirect back to homepage
|
||||||
|
return 'HTTP/1.1 303 See Other\r\nLocation: /\r\n\r\n'
|
||||||
|
|
||||||
elif mode_action == 'permanent_hold':
|
elif mode_action == 'permanent_hold':
|
||||||
# Enter permanent hold (disable schedules permanently)
|
# Enter permanent hold (disable schedules permanently)
|
||||||
@ -156,7 +158,8 @@ class TempWebServer:
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
return self._get_status_page(sensors, ac_monitor, heater_monitor, show_success=True)
|
# Redirect back to homepage
|
||||||
|
return 'HTTP/1.1 303 See Other\r\nLocation: /\r\n\r\n'
|
||||||
# ===== END: Handle mode actions =====
|
# ===== END: Handle mode actions =====
|
||||||
|
|
||||||
elif mode_action == 'save_schedules':
|
elif mode_action == 'save_schedules':
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user