mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 19:57:07 +00:00
Do not use POWER_WATT for West wind direction (#34069)
This commit is contained in:
parent
24c45bfd84
commit
e273ff5e5e
@ -4,13 +4,7 @@ import logging
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.weather import PLATFORM_SCHEMA, WeatherEntity
|
||||
from homeassistant.const import (
|
||||
CONF_LATITUDE,
|
||||
CONF_LONGITUDE,
|
||||
CONF_NAME,
|
||||
POWER_WATT,
|
||||
TEMP_CELSIUS,
|
||||
)
|
||||
from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME, TEMP_CELSIUS
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
|
||||
# Reuse data and API logic from the sensor implementation
|
||||
@ -105,7 +99,7 @@ class BOMWeather(WeatherEntity):
|
||||
"SSW",
|
||||
"SW",
|
||||
"WSW",
|
||||
POWER_WATT,
|
||||
"W",
|
||||
"WNW",
|
||||
"NW",
|
||||
"NNW",
|
||||
|
@ -414,7 +414,7 @@ def _get_wind_direction(wind_direction_degree: float) -> str:
|
||||
if 236.25 <= wind_direction_degree < 258.75:
|
||||
return "WSW"
|
||||
if 258.75 <= wind_direction_degree < 281.25:
|
||||
return POWER_WATT
|
||||
return "W"
|
||||
if 281.25 <= wind_direction_degree < 303.75:
|
||||
return "WNW"
|
||||
if 303.75 <= wind_direction_degree < 326.25:
|
||||
|
Loading…
x
Reference in New Issue
Block a user