Skip to content

Sort alarms by severity#10

Open
lizy14 wants to merge 4 commits into
hasscc:mainfrom
lizy14:main
Open

Sort alarms by severity#10
lizy14 wants to merge 4 commits into
hasscc:mainfrom
lizy14:main

Conversation

@lizy14

@lizy14 lizy14 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

This PR improves alarm handling for the warning binary sensor by:

  • Sorting alarms by severity in descending order (04 red > 03 orange > 02 yellow > 01 blue)
  • Ensuring entity_picture uses the highest-severity alarm icon
  • Deduplicating warning titles while preserving display order

Before:

title: 暴雨蓝色预警信号, 大风蓝色预警信号, 雷电黄色预警信号

After:

title: 雷电黄色预警信号, 暴雨蓝色预警信号, 大风蓝色预警信号

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants