Fix nonlocal scoping in CSS processing, move brightness source emoji to dropdown items
Add nonlocal declarations for _u16_a, _u16_b, _i32 in nested functions _blend_u16 and _apply_corrections — Python treats augmented assignments (*=, +=, >>=) as local variable bindings, causing UnboundLocalError that prevented any frames from being sent to devices. Move 🔢 emoji from brightness source label to dropdown option items. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -363,11 +363,9 @@ function _populateKCBrightnessVsDropdown(selectedId = '') {
|
||||
// Keep the first "None" option, remove the rest
|
||||
while (sel.options.length > 1) sel.remove(1);
|
||||
_cachedValueSources.forEach(vs => {
|
||||
const typeIcons = { static: '📊', animated: '🔄', audio: '🎵' };
|
||||
const icon = typeIcons[vs.source_type] || '🔢';
|
||||
const opt = document.createElement('option');
|
||||
opt.value = vs.id;
|
||||
opt.textContent = `${icon} ${vs.name}`;
|
||||
opt.textContent = `🔢 ${vs.name}`;
|
||||
sel.appendChild(opt);
|
||||
});
|
||||
sel.value = selectedId || '';
|
||||
|
||||
Reference in New Issue
Block a user