feat: configure built-in breathing colors per alert category

This commit is contained in:
way
2026-09-27 21:14:22 +08:00
parent 18fd1febe2
commit 4367d0b9d0
5 changed files with 21 additions and 8 deletions
+1 -1
View File
@@ -200,7 +200,7 @@ class Controller:
if a:
group=a['category'];level=('warning','critical','emergency')[int(a['severity'])-1]
label=f"{group}_{level}_{c['alert_mode']}".upper()
if c['alert_mode']=='breathe':return ('effect',1,c[level+'_speed'],COLORS[GROUPS[group]],c['write_delay_ms']),label
if c['alert_mode']=='breathe':return ('effect',1,c[level+'_speed'],COLORS[c.get(group+'_breathe_color',GROUPS[group])],c['write_delay_ms']),label
mode='flash';prefix=level
else:
group='normal';prefix='normal';mode=c['normal_mode'];label='NORMAL_'+mode.upper()