mirror of
https://github.com/home-assistant/core.git
synced 2025-08-13 01:25:23 +02:00
fix wind bearing observation
This commit is contained in:
@@ -244,7 +244,7 @@ class NWSWeather(WeatherEntity):
|
|||||||
"""Return the current wind bearing (degrees)."""
|
"""Return the current wind bearing (degrees)."""
|
||||||
wind_bearing = None
|
wind_bearing = None
|
||||||
if self.observation:
|
if self.observation:
|
||||||
wind_bearing = self.observation.get('windBearing')
|
wind_bearing = self.observation.get('windDirection')
|
||||||
return wind_bearing
|
return wind_bearing
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@@ -29,7 +29,7 @@ from tests.common import get_test_home_assistant, MockDependency
|
|||||||
OBS = {
|
OBS = {
|
||||||
'temperature': 7,
|
'temperature': 7,
|
||||||
'relativeHumidity': 10,
|
'relativeHumidity': 10,
|
||||||
'windBearing': 180,
|
'windDirection': 180,
|
||||||
'visibility': 10000,
|
'visibility': 10000,
|
||||||
'windSpeed': 10,
|
'windSpeed': 10,
|
||||||
'seaLevelPressure': 30000,
|
'seaLevelPressure': 30000,
|
||||||
|
Reference in New Issue
Block a user