FL550 / dwd_weather

Deutscher Wetterdienst integration for Home-Assistant
MIT License
194 stars 12 forks source link

Return wind_bearing value as float #2

Closed VDRainer closed 4 years ago

VDRainer commented 4 years ago

Version of the custom_component

1.0.0

Describe the bug

Wondered why weather cards don't show the wind_direction. For example bram's weather-card. Auswahl_381

Found out that the component doesn't return a float for the wind_bearing. After changing https://github.com/FL550/dwd_weather/blob/88f696c12a45e7867a76ee4911a17f93848b35d0/custom_components/dwd_weather/weather.py#L90-L91 to

    @property
    def wind_bearing(self):
        """Return the wind direction."""
        return float(
            self._connector.weather_data.get_forecast_wind_direction(
                datetime.now(timezone.utc), False))

it works. Auswahl_382

Debug log


Add your logs here.
FL550 commented 4 years ago

I just released v1.0.1 3c88950 which fixes this. Thank you for your input!