Add new attributes to Met Éireann (#150653)

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
rossfoss
2025-08-19 16:04:35 +01:00
committed by GitHub
parent 65696f9b53
commit 10fe479311
2 changed files with 16 additions and 0 deletions

View File

@@ -10,9 +10,12 @@ from homeassistant.components.weather import (
ATTR_CONDITION_SNOWY, ATTR_CONDITION_SNOWY,
ATTR_CONDITION_SNOWY_RAINY, ATTR_CONDITION_SNOWY_RAINY,
ATTR_CONDITION_SUNNY, ATTR_CONDITION_SUNNY,
ATTR_FORECAST_CLOUD_COVERAGE,
ATTR_FORECAST_HUMIDITY,
ATTR_FORECAST_NATIVE_PRESSURE, ATTR_FORECAST_NATIVE_PRESSURE,
ATTR_FORECAST_NATIVE_TEMP, ATTR_FORECAST_NATIVE_TEMP,
ATTR_FORECAST_NATIVE_TEMP_LOW, ATTR_FORECAST_NATIVE_TEMP_LOW,
ATTR_FORECAST_NATIVE_WIND_GUST_SPEED,
ATTR_FORECAST_NATIVE_WIND_SPEED, ATTR_FORECAST_NATIVE_WIND_SPEED,
ATTR_FORECAST_PRECIPITATION, ATTR_FORECAST_PRECIPITATION,
ATTR_FORECAST_WIND_BEARING, ATTR_FORECAST_WIND_BEARING,
@@ -34,6 +37,9 @@ FORECAST_MAP = {
ATTR_FORECAST_NATIVE_TEMP_LOW: "templow", ATTR_FORECAST_NATIVE_TEMP_LOW: "templow",
ATTR_FORECAST_WIND_BEARING: "wind_bearing", ATTR_FORECAST_WIND_BEARING: "wind_bearing",
ATTR_FORECAST_NATIVE_WIND_SPEED: "wind_speed", ATTR_FORECAST_NATIVE_WIND_SPEED: "wind_speed",
ATTR_FORECAST_NATIVE_WIND_GUST_SPEED: "wind_gust",
ATTR_FORECAST_CLOUD_COVERAGE: "cloudiness",
ATTR_FORECAST_HUMIDITY: "humidity",
} }
CONDITION_MAP = { CONDITION_MAP = {

View File

@@ -138,6 +138,16 @@ class MetEireannWeather(
"""Return the wind direction.""" """Return the wind direction."""
return self.coordinator.data.current_weather_data.get("wind_bearing") return self.coordinator.data.current_weather_data.get("wind_bearing")
@property
def native_wind_gust_speed(self) -> float | None:
"""Return the wind gust speed in native units."""
return self.coordinator.data.current_weather_data.get("wind_gust")
@property
def cloud_coverage(self) -> float | None:
"""Return the cloud coverage."""
return self.coordinator.data.current_weather_data.get("cloudiness")
def _forecast(self, hourly: bool) -> list[Forecast]: def _forecast(self, hourly: bool) -> list[Forecast]:
"""Return the forecast array.""" """Return the forecast array."""
if hourly: if hourly: