mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Update open-meteo to v0.3.1 (#103613)
This commit is contained in:
parent
836ebfd84b
commit
95fe7aa491
@ -1,7 +1,6 @@
|
||||
"""Diagnostics support for Open-Meteo."""
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
from typing import Any
|
||||
|
||||
from open_meteo import Forecast
|
||||
@ -25,6 +24,4 @@ async def async_get_config_entry_diagnostics(
|
||||
) -> dict[str, Any]:
|
||||
"""Return diagnostics for a config entry."""
|
||||
coordinator: DataUpdateCoordinator[Forecast] = hass.data[DOMAIN][entry.entry_id]
|
||||
# Round-trip via JSON to trigger serialization
|
||||
data: dict[str, Any] = json.loads(coordinator.data.json())
|
||||
return async_redact_data(data, TO_REDACT)
|
||||
return async_redact_data(coordinator.data.to_dict(), TO_REDACT)
|
||||
|
@ -7,5 +7,5 @@
|
||||
"documentation": "https://www.home-assistant.io/integrations/open_meteo",
|
||||
"integration_type": "service",
|
||||
"iot_class": "cloud_polling",
|
||||
"requirements": ["open-meteo==0.2.1"]
|
||||
"requirements": ["open-meteo==0.3.1"]
|
||||
}
|
||||
|
@ -1370,7 +1370,7 @@ onvif-zeep-async==3.1.12
|
||||
open-garage==0.2.0
|
||||
|
||||
# homeassistant.components.open_meteo
|
||||
open-meteo==0.2.1
|
||||
open-meteo==0.3.1
|
||||
|
||||
# homeassistant.components.openai_conversation
|
||||
openai==0.27.2
|
||||
|
@ -1066,7 +1066,7 @@ onvif-zeep-async==3.1.12
|
||||
open-garage==0.2.0
|
||||
|
||||
# homeassistant.components.open_meteo
|
||||
open-meteo==0.2.1
|
||||
open-meteo==0.3.1
|
||||
|
||||
# homeassistant.components.openai_conversation
|
||||
openai==0.27.2
|
||||
|
@ -40,7 +40,7 @@ def mock_open_meteo(request: pytest.FixtureRequest) -> Generator[None, MagicMock
|
||||
if hasattr(request, "param") and request.param:
|
||||
fixture = request.param
|
||||
|
||||
forecast = Forecast.parse_raw(load_fixture(fixture, DOMAIN))
|
||||
forecast = Forecast.from_json(load_fixture(fixture, DOMAIN))
|
||||
with patch(
|
||||
"homeassistant.components.open_meteo.OpenMeteo", autospec=True
|
||||
) as open_meteo_mock:
|
||||
|
Loading…
x
Reference in New Issue
Block a user