mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Add humidity to meteo_france weather forecast (#96524)
Add humidity to forecast figures
This commit is contained in:
parent
f4bc32ea08
commit
90bdbf503a
@ -137,6 +137,13 @@ SENSOR_TYPES: tuple[MeteoFranceSensorEntityDescription, ...] = (
|
||||
entity_registry_enabled_default=False,
|
||||
data_path="today_forecast:weather12H:desc",
|
||||
),
|
||||
MeteoFranceSensorEntityDescription(
|
||||
key="humidity",
|
||||
name="Humidity",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
icon="mdi:water-percent",
|
||||
data_path="current_forecast:humidity",
|
||||
),
|
||||
)
|
||||
|
||||
SENSOR_TYPES_RAIN: tuple[MeteoFranceSensorEntityDescription, ...] = (
|
||||
|
@ -6,6 +6,7 @@ from meteofrance_api.model.forecast import Forecast
|
||||
|
||||
from homeassistant.components.weather import (
|
||||
ATTR_FORECAST_CONDITION,
|
||||
ATTR_FORECAST_HUMIDITY,
|
||||
ATTR_FORECAST_NATIVE_PRECIPITATION,
|
||||
ATTR_FORECAST_NATIVE_TEMP,
|
||||
ATTR_FORECAST_NATIVE_TEMP_LOW,
|
||||
@ -171,6 +172,7 @@ class MeteoFranceWeather(
|
||||
ATTR_FORECAST_CONDITION: format_condition(
|
||||
forecast["weather"]["desc"]
|
||||
),
|
||||
ATTR_FORECAST_HUMIDITY: forecast["humidity"],
|
||||
ATTR_FORECAST_NATIVE_TEMP: forecast["T"]["value"],
|
||||
ATTR_FORECAST_NATIVE_PRECIPITATION: forecast["rain"].get("1h"),
|
||||
ATTR_FORECAST_NATIVE_WIND_SPEED: forecast["wind"]["speed"],
|
||||
@ -192,6 +194,7 @@ class MeteoFranceWeather(
|
||||
ATTR_FORECAST_CONDITION: format_condition(
|
||||
forecast["weather12H"]["desc"]
|
||||
),
|
||||
ATTR_FORECAST_HUMIDITY: forecast["humidity"]["max"],
|
||||
ATTR_FORECAST_NATIVE_TEMP: forecast["T"]["max"],
|
||||
ATTR_FORECAST_NATIVE_TEMP_LOW: forecast["T"]["min"],
|
||||
ATTR_FORECAST_NATIVE_PRECIPITATION: forecast["precipitation"][
|
||||
|
Loading…
x
Reference in New Issue
Block a user