Improve category map for air quality and pollen sensors in AccuWeather (#140193)

* Fix typo

* Improve category map for air quality and pollen

* Update test snapshot
This commit is contained in:
Maciej Bieniek 2025-03-09 15:18:26 +01:00 committed by GitHub
parent e8069e1c07
commit 8a67e89e91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 17 additions and 4 deletions

View File

@ -59,13 +59,14 @@ AIR_QUALITY_CATEGORY_MAP = {
1: "good", 1: "good",
2: "moderate", 2: "moderate",
3: "unhealthy", 3: "unhealthy",
4: "hazardous", 4: "very_unhealthy",
5: "hazardous",
} }
POLLEN_CATEGORY_MAP = { POLLEN_CATEGORY_MAP = {
1: "low", 1: "low",
2: "moderate", 2: "moderate",
3: "high", 3: "high",
4: "very high", 4: "very_high",
} }
UPDATE_INTERVAL_OBSERVATION = timedelta(minutes=40) UPDATE_INTERVAL_OBSERVATION = timedelta(minutes=40)
UPDATE_INTERVAL_DAILY_FORECAST = timedelta(hours=6) UPDATE_INTERVAL_DAILY_FORECAST = timedelta(hours=6)

View File

@ -27,7 +27,8 @@
"good": "Good", "good": "Good",
"hazardous": "Hazardous", "hazardous": "Hazardous",
"moderate": "Moderate", "moderate": "Moderate",
"unhealthy": "Unhealthy" "unhealthy": "Unhealthy",
"very_unhealthy": "Very unhealthy"
}, },
"state_attributes": { "state_attributes": {
"options": { "options": {
@ -35,7 +36,8 @@
"good": "[%key:component::accuweather::entity::sensor::air_quality::state::good%]", "good": "[%key:component::accuweather::entity::sensor::air_quality::state::good%]",
"hazardous": "[%key:component::accuweather::entity::sensor::air_quality::state::hazardous%]", "hazardous": "[%key:component::accuweather::entity::sensor::air_quality::state::hazardous%]",
"moderate": "[%key:component::accuweather::entity::sensor::air_quality::state::moderate%]", "moderate": "[%key:component::accuweather::entity::sensor::air_quality::state::moderate%]",
"unhealthy": "[%key:component::accuweather::entity::sensor::air_quality::state::unhealthy%]" "unhealthy": "[%key:component::accuweather::entity::sensor::air_quality::state::unhealthy%]",
"very_unhealthy": "[%key:component::accuweather::entity::sensor::air_quality::state::very_unhealthy%]"
} }
} }
} }

View File

@ -9,6 +9,7 @@
'good', 'good',
'moderate', 'moderate',
'unhealthy', 'unhealthy',
'very_unhealthy',
'hazardous', 'hazardous',
]), ]),
}), }),
@ -50,6 +51,7 @@
'good', 'good',
'moderate', 'moderate',
'unhealthy', 'unhealthy',
'very_unhealthy',
'hazardous', 'hazardous',
]), ]),
}), }),
@ -71,6 +73,7 @@
'good', 'good',
'moderate', 'moderate',
'unhealthy', 'unhealthy',
'very_unhealthy',
'hazardous', 'hazardous',
]), ]),
}), }),
@ -112,6 +115,7 @@
'good', 'good',
'moderate', 'moderate',
'unhealthy', 'unhealthy',
'very_unhealthy',
'hazardous', 'hazardous',
]), ]),
}), }),
@ -133,6 +137,7 @@
'good', 'good',
'moderate', 'moderate',
'unhealthy', 'unhealthy',
'very_unhealthy',
'hazardous', 'hazardous',
]), ]),
}), }),
@ -174,6 +179,7 @@
'good', 'good',
'moderate', 'moderate',
'unhealthy', 'unhealthy',
'very_unhealthy',
'hazardous', 'hazardous',
]), ]),
}), }),
@ -195,6 +201,7 @@
'good', 'good',
'moderate', 'moderate',
'unhealthy', 'unhealthy',
'very_unhealthy',
'hazardous', 'hazardous',
]), ]),
}), }),
@ -236,6 +243,7 @@
'good', 'good',
'moderate', 'moderate',
'unhealthy', 'unhealthy',
'very_unhealthy',
'hazardous', 'hazardous',
]), ]),
}), }),
@ -257,6 +265,7 @@
'good', 'good',
'moderate', 'moderate',
'unhealthy', 'unhealthy',
'very_unhealthy',
'hazardous', 'hazardous',
]), ]),
}), }),
@ -298,6 +307,7 @@
'good', 'good',
'moderate', 'moderate',
'unhealthy', 'unhealthy',
'very_unhealthy',
'hazardous', 'hazardous',
]), ]),
}), }),