Add global brightness control feature with socket handling and UI updates
This commit is contained in:
8
app.py
8
app.py
@@ -113,6 +113,14 @@ def handle_animation_speed_update(data):
|
||||
# Broadcast animation speed update to all clients
|
||||
emit('animation_speed_update', data, broadcast=True, include_self=False)
|
||||
|
||||
@socketio.on('brightness_update')
|
||||
def handle_brightness_update(data):
|
||||
"""Handle brightness updates from controller"""
|
||||
print(f'Brightness update received: {data}')
|
||||
print(f'Broadcasting brightness update to {len(connected_clients)} clients')
|
||||
# Broadcast brightness update to all clients
|
||||
emit('brightness_update', data, broadcast=True, include_self=False)
|
||||
|
||||
@socketio.on('join_room')
|
||||
def handle_join_room(data):
|
||||
"""Handle client joining a specific room"""
|
||||
|
||||
Reference in New Issue
Block a user