diff --git a/app/views.py b/app/views.py index a1839b1..dfe7768 100644 --- a/app/views.py +++ b/app/views.py @@ -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"})