mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 06:17:07 +00:00
Fix pydantic warnings in purpleair (#133247)
This commit is contained in:
parent
9494128395
commit
af6948a911
@ -37,7 +37,7 @@ async def async_get_config_entry_diagnostics(
|
||||
return async_redact_data(
|
||||
{
|
||||
"entry": entry.as_dict(),
|
||||
"data": coordinator.data.dict(), # type: ignore[deprecated]
|
||||
"data": coordinator.data.model_dump(),
|
||||
},
|
||||
TO_REDACT,
|
||||
)
|
||||
|
@ -73,7 +73,7 @@ def config_entry_options_fixture() -> dict[str, Any]:
|
||||
@pytest.fixture(name="get_sensors_response", scope="package")
|
||||
def get_sensors_response_fixture() -> GetSensorsResponse:
|
||||
"""Define a fixture to mock an aiopurpleair GetSensorsResponse object."""
|
||||
return GetSensorsResponse.parse_raw(
|
||||
return GetSensorsResponse.model_validate_json(
|
||||
load_fixture("get_sensors_response.json", "purpleair")
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user