mirror of
https://github.com/home-assistant/core.git
synced 2025-08-30 01:42:21 +02:00
Add new attributes to Met Éireann (#150653)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
@@ -10,9 +10,12 @@ from homeassistant.components.weather import (
|
||||
ATTR_CONDITION_SNOWY,
|
||||
ATTR_CONDITION_SNOWY_RAINY,
|
||||
ATTR_CONDITION_SUNNY,
|
||||
ATTR_FORECAST_CLOUD_COVERAGE,
|
||||
ATTR_FORECAST_HUMIDITY,
|
||||
ATTR_FORECAST_NATIVE_PRESSURE,
|
||||
ATTR_FORECAST_NATIVE_TEMP,
|
||||
ATTR_FORECAST_NATIVE_TEMP_LOW,
|
||||
ATTR_FORECAST_NATIVE_WIND_GUST_SPEED,
|
||||
ATTR_FORECAST_NATIVE_WIND_SPEED,
|
||||
ATTR_FORECAST_PRECIPITATION,
|
||||
ATTR_FORECAST_WIND_BEARING,
|
||||
@@ -34,6 +37,9 @@ FORECAST_MAP = {
|
||||
ATTR_FORECAST_NATIVE_TEMP_LOW: "templow",
|
||||
ATTR_FORECAST_WIND_BEARING: "wind_bearing",
|
||||
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 = {
|
||||
|
@@ -138,6 +138,16 @@ class MetEireannWeather(
|
||||
"""Return the wind direction."""
|
||||
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]:
|
||||
"""Return the forecast array."""
|
||||
if hourly:
|
||||
|
Reference in New Issue
Block a user