Skip to content

Commit

Permalink
Fix pydantic warnings in purpleair (home-assistant#133247)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p authored Dec 15, 2024
1 parent 9494128 commit af6948a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/purpleair/diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
2 changes: 1 addition & 1 deletion tests/components/purpleair/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
)

Expand Down

0 comments on commit af6948a

Please sign in to comment.