Skip to content

Commit

Permalink
Add check state
Browse files Browse the repository at this point in the history
  • Loading branch information
DewGew authored Feb 5, 2024
1 parent 37910d6 commit c7bfb3d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def devices():
camurl = request.form.get('camurl')
actual_temp_idx = request.form.get('actual_temp_idx')
selector_modes_idx = request.form.get('selector_modes_idx')
check_state = request.form.get('checkState')

if idx not in deviceconfig.keys():
deviceconfig[idx] = {}
Expand All @@ -76,6 +77,11 @@ def devices():
deviceconfig[idx].update({'report_state': False})
elif idx in deviceconfig.keys() and 'report_state' in deviceconfig[idx]:
deviceconfig[idx].pop('report_state')

if check_state != 'on':
deviceconfig[idx].update({'check_state': False})
elif idx in deviceconfig.keys() and 'check_state' in deviceconfig[idx]:
deviceconfig[idx].pop('check_state')

if challenge == 'ackNeeded':
deviceconfig[idx].update({'ack': True})
Expand Down

0 comments on commit c7bfb3d

Please sign in to comment.