Files
home-assistant-core/homeassistant/components/nws/const.py
T
MatthewFlammandJ. Nick Koston 6d812bd957 Add config flow to nws and remove yaml configuration (#34267)
* add config flow to nws and remove yaml

* Don't duplicate scan_time

Co-Authored-By: J. Nick Koston <nick@koston.org>

* Use _abort_if_unique_id_configured

Co-Authored-By: J. Nick Koston <nick@koston.org>

* fix abort

* Add unavailable tests

* update and use better strings

* lint

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-04-16 09:15:55 -05:00

58 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"],
}
DAYNIGHT = "daynight"
HOURLY = "hourly"