Skip to content

fix: suppress Pydantic V1 warning on Python 3.14+#56

Open
Sarvesh-Sarz wants to merge 1 commit intohass-energy:mainfrom
Sarvesh-Sarz:fix/pydantic-v1-python314-warning
Open

fix: suppress Pydantic V1 warning on Python 3.14+#56
Sarvesh-Sarz wants to merge 1 commit intohass-energy:mainfrom
Sarvesh-Sarz:fix/pydantic-v1-python314-warning

Conversation

@Sarvesh-Sarz
Copy link

Fixes #55

Problem

When running on Python 3.14, the following warning appears in Home Assistant logs:

UserWarning: Core Pydantic V1 functionality isn't compatible with Python 3.14 or greater
at amberelectric/api/amber_api.py:21

This is caused by the amberelectric SDK internally using pydantic.v1,
which is incompatible with Python 3.14+.

So IAdded a warnings.filterwarnings call in coordinator.py to suppress
this warning before the library is imported.
A permanent fix would require the amberelectric SDK to migrate from
Pydantic V1 to V2, which is an upstream issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python warning

1 participant