Skip to content

Commit

Permalink
feat: add missing state very unhealthy (#36)
Browse files Browse the repository at this point in the history
* add translation

* handle very unhealthy aqi
  • Loading branch information
CFenner authored Jan 4, 2024
1 parent bdc7305 commit f299793
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion MMM-AirQuality.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Module.register('MMM-AirQuality', {
MODERATE: '#ffde33',
UNHEALTHY_FOR_SENSITIVE_GROUPS: '#ff9933',
UNHEALTHY: '#cc0033',
VERY_UNHEALTHY: '#660099',
HAZARDOUS: '#7e0023',
UNKNOWN: '#333333',
},
Expand Down Expand Up @@ -58,7 +59,8 @@ Module.register('MMM-AirQuality', {
if (aqi < 101) return 'MODERATE'
if (aqi < 151) return 'UNHEALTHY_FOR_SENSITIVE_GROUPS'
if (aqi < 201) return 'UNHEALTHY'
if (aqi < 301) return 'HAZARDOUS'
if (aqi < 301) return 'VERY_UNHEALTHY'
if (aqi > 300) return 'HAZARDOUS'
return 'UNKNOWN'
},
getColor: function (impact) {
Expand Down
1 change: 1 addition & 0 deletions l10n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"MODERATE": "moderat",
"UNHEALTHY_FOR_SENSITIVE_GROUPS": "ungesund für gefährdete Gruppen",
"UNHEALTHY": "ungesund",
"VERY_UNHEALTHY": "sehr ungesund",
"HAZARDOUS": "gefährlich",
"UNKNOWN": "unbekannt"
}
1 change: 1 addition & 0 deletions l10n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"MODERATE": "Moderate",
"UNHEALTHY_FOR_SENSITIVE_GROUPS": "Unhealty for Sensitive Groups",
"UNHEALTHY": "Unhealthy",
"VERY_UNHEALTHY": "Very Unhealthy",
"HAZARDOUS": "Hazardous",
"UNKNOWN": "Unknown"
}

0 comments on commit f299793

Please sign in to comment.