test
All checks were successful
Deploy powerbar.ti Frontend Portal / Deploy-Tinance2-Frontend-Portal-Production (push) Successful in 36s

This commit is contained in:
Matthew Frost 2023-12-02 19:59:38 +01:00
parent 9446e98087
commit 0fea3871c5

View file

@ -211,6 +211,7 @@ def powebar_group_action(group, action):
for outlet in device['outlets']:
if outlet in powerbars[powerbar]['outlets']:
powerbars[powerbar]['outlets'][outlet]['state'] = action
app.socketio.emit('power-event',{'powerbar': powerbar, 'outlet' : outlet, 'action' : action}, namespace='/powerupdates')
print(f"Turned {action} powerbar {powerbar} outlet {outlet}")
return jsonify({'status': "200"})