mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
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:
parent
e8069e1c07
commit
8a67e89e91
@ -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)
|
||||||
|
@ -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%]"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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',
|
||||||
]),
|
]),
|
||||||
}),
|
}),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user