mirror of
https://github.com/home-assistant/core.git
synced 2025-05-20 13:59:15 +00:00

* convert nws to component configuration * add more debug logging * remove assumed state * move initialization of data into init * refactor update logic * use forecast success for checking available entities * Split unique_id into more usable pieces. use a base_unique_id for each entry. Add domain for signaling to entities. Each entity in each platform can use base_unique_id to form individual unique_id's. * Revert "move initialization of data into init" This reverts commit 09eb0220469285b10f0500f5f6def67415931a81. * add silver quality scale to manifest * unsubscribe listener in will_remove_from_hass * initialize _unsub_listener in __init__ * use async_on_remove * remove scan interval from configuration * Use better name Co-Authored-By: J. Nick Koston <nick@koston.org> Co-authored-by: J. Nick Koston <nick@koston.org>
55 lines
1.4 KiB
Python
55 lines
1.4 KiB
Python
"""Constants for National Weather Service Integration."""
|
|
DOMAIN = "nws"
|
|
|
|
CONF_STATION = "station"
|
|
|
|
ATTRIBUTION = "Data from National Weather Service/NOAA"
|
|
|
|
ATTR_FORECAST_DETAILED_DESCRIPTION = "detailed_description"
|
|
ATTR_FORECAST_PRECIP_PROB = "precipitation_probability"
|
|
ATTR_FORECAST_DAYTIME = "daytime"
|
|
|
|
CONDITION_CLASSES = {
|
|
"exceptional": [
|
|
"Tornado",
|
|
"Hurricane conditions",
|
|
"Tropical storm conditions",
|
|
"Dust",
|
|
"Smoke",
|
|
"Haze",
|
|
"Hot",
|
|
"Cold",
|
|
],
|
|
"snowy": ["Snow", "Sleet", "Blizzard"],
|
|
"snowy-rainy": [
|
|
"Rain/snow",
|
|
"Rain/sleet",
|
|
"Freezing rain/snow",
|
|
"Freezing rain",
|
|
"Rain/freezing rain",
|
|
],
|
|
"hail": [],
|
|
"lightning-rainy": [
|
|
"Thunderstorm (high cloud cover)",
|
|
"Thunderstorm (medium cloud cover)",
|
|
"Thunderstorm (low cloud cover)",
|
|
],
|
|
"lightning": [],
|
|
"pouring": [],
|
|
"rainy": [
|
|
"Rain",
|
|
"Rain showers (high cloud cover)",
|
|
"Rain showers (low cloud cover)",
|
|
],
|
|
"windy-variant": ["Mostly cloudy and windy", "Overcast and windy"],
|
|
"windy": [
|
|
"Fair/clear and windy",
|
|
"A few clouds and windy",
|
|
"Partly cloudy and windy",
|
|
],
|
|
"fog": ["Fog/mist"],
|
|
"clear": ["Fair/clear"], # sunny and clear-night
|
|
"cloudy": ["Mostly cloudy", "Overcast"],
|
|
"partlycloudy": ["A few clouds", "Partly cloudy"],
|
|
}
|