Skip to content

Commit

Permalink
Merge pull request #156 from rnorth/patch-1
Browse files Browse the repository at this point in the history
Stop multiplying UV index in hourly forecast by 100
  • Loading branch information
alexander0042 authored Dec 5, 2023
2 parents 8e126cb + d42997c commit a87356a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/pirateweather/weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def _map_hourly_forecast(forecast: dict[str, Any]) -> Forecast:
"native_precipitation": round(forecast.d.get("precipIntensity"), 2),
"precipitation_probability":round(forecast.d.get("precipProbability")*100, 0),
"cloud_coverage": round(forecast.d.get("cloudCover")*100, 0),
"uv_index": round(forecast.d.get("uvIndex")*100, 0),
"uv_index": round(forecast.d.get("uvIndex"), 2),
}

async def async_setup_entry(
Expand Down Expand Up @@ -408,4 +408,4 @@ async def async_added_to_hass(self) -> None:
"""Connect to dispatcher listening for entity data notifications."""
self.async_on_remove(
self._weather_coordinator.async_add_listener(self.async_write_ha_state)
)
)

0 comments on commit a87356a

Please sign in to comment.