Skip to content

Commit

Permalink
Fixed wind-speed in weather entity
Browse files Browse the repository at this point in the history
  • Loading branch information
liangleslie committed May 12, 2022
1 parent b827dc6 commit faf1941
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/nea_sg_weather/nea.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,8 @@ async def async_init(self):
"wind_direction": self.direction.response,
}
self.wind_status = self.calc_wind_status(
self.direction.data,
self.speed.data,
self.direction.data,
)
self.wind_speed_avg = self.wind_status["agg_wind_speed"]
self.wind_dir_avg = self.wind_status["agg_wind_direction"]
Expand Down
2 changes: 1 addition & 1 deletion custom_components/nea_sg_weather/weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def humidity(self):
@property
def wind_speed(self):
"""Return the wind speed."""
return round(self.coordinator.data.wind.wind_speed_avg * 1.852, 2)
return round(self.coordinator.data.wind.wind_speed_avg, 2)

@property
def wind_bearing(self):
Expand Down

0 comments on commit faf1941

Please sign in to comment.