From faf19413498485c508a1527cd2674f81f0586484 Mon Sep 17 00:00:00 2001 From: Leslie Liang Date: Thu, 12 May 2022 18:16:12 +0000 Subject: [PATCH] Fixed wind-speed in weather entity --- custom_components/nea_sg_weather/nea.py | 2 +- custom_components/nea_sg_weather/weather.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/nea_sg_weather/nea.py b/custom_components/nea_sg_weather/nea.py index fb9220d669..c1b9ccf6df 100644 --- a/custom_components/nea_sg_weather/nea.py +++ b/custom_components/nea_sg_weather/nea.py @@ -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"] diff --git a/custom_components/nea_sg_weather/weather.py b/custom_components/nea_sg_weather/weather.py index 7e3fc0220d..13e977aa1f 100644 --- a/custom_components/nea_sg_weather/weather.py +++ b/custom_components/nea_sg_weather/weather.py @@ -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):