Skip to content

Commit f299793

Browse files
authored
feat: add missing state very unhealthy (#36)
* add translation * handle very unhealthy aqi
1 parent bdc7305 commit f299793

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

MMM-AirQuality.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Module.register('MMM-AirQuality', {
2828
MODERATE: '#ffde33',
2929
UNHEALTHY_FOR_SENSITIVE_GROUPS: '#ff9933',
3030
UNHEALTHY: '#cc0033',
31+
VERY_UNHEALTHY: '#660099',
3132
HAZARDOUS: '#7e0023',
3233
UNKNOWN: '#333333',
3334
},
@@ -58,7 +59,8 @@ Module.register('MMM-AirQuality', {
5859
if (aqi < 101) return 'MODERATE'
5960
if (aqi < 151) return 'UNHEALTHY_FOR_SENSITIVE_GROUPS'
6061
if (aqi < 201) return 'UNHEALTHY'
61-
if (aqi < 301) return 'HAZARDOUS'
62+
if (aqi < 301) return 'VERY_UNHEALTHY'
63+
if (aqi > 300) return 'HAZARDOUS'
6264
return 'UNKNOWN'
6365
},
6466
getColor: function (impact) {

l10n/de.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"MODERATE": "moderat",
55
"UNHEALTHY_FOR_SENSITIVE_GROUPS": "ungesund für gefährdete Gruppen",
66
"UNHEALTHY": "ungesund",
7+
"VERY_UNHEALTHY": "sehr ungesund",
78
"HAZARDOUS": "gefährlich",
89
"UNKNOWN": "unbekannt"
910
}

l10n/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"MODERATE": "Moderate",
55
"UNHEALTHY_FOR_SENSITIVE_GROUPS": "Unhealty for Sensitive Groups",
66
"UNHEALTHY": "Unhealthy",
7+
"VERY_UNHEALTHY": "Very Unhealthy",
78
"HAZARDOUS": "Hazardous",
89
"UNKNOWN": "Unknown"
910
}

0 commit comments

Comments
 (0)