Description
Updating to Teslemetry 5.3.0 introduces a dependency on tesla-fleet-api==1.5.4, which requires cryptography>=43. Because cryptography requires cffi>=1.12 (unpinned), Home Assistant's setup routine runs pip install and pulls in the latest version of cffi (version 2.1.0).
However, Home Assistant OS runs in a musl/alpine docker environment without compilation tools pre-installed in the production image. As a result, pip successfully upgrades the pure-Python files of cffi to 2.1.0, but cannot build or update the binary backend (_cffi_backend.so), which remains at version 2.0.0 (provided by the HA OS core image).
This creates a fatal version mismatch in the Python environment, causing any integration relying on cffi (such as the built-in snoo integration, custom components like google_home, and potentially many others using cryptography or pycryptodome) to fail to setup on startup with the following exception:
Exception: Version mismatch: this is the 'cffi' package version 2.1.0, located in '/usr/local/lib/python3.14/site-packages/cffi/api.py'. When we import the top-level '_cffi_backend' extension module, we get version 2.0.0, located in '/usr/local/lib/python3.14/site-packages/_cffi_backend.cpython-314-aarch64-linux-musl.so'.
Suggested Fix
To prevent breaking other core and custom integrations on Home Assistant, the integration should pin or check cffi package versions, or avoid upgrading core/system precompiled libraries. Alternatively, pinning cffi==2.0.0 in the manifest/requirements when running under Home Assistant would avoid pulling the mismatched 2.1.0 package.
Description
Updating to Teslemetry 5.3.0 introduces a dependency on
tesla-fleet-api==1.5.4, which requirescryptography>=43. Becausecryptographyrequirescffi>=1.12(unpinned), Home Assistant's setup routine runspip installand pulls in the latest version ofcffi(version2.1.0).However, Home Assistant OS runs in a musl/alpine docker environment without compilation tools pre-installed in the production image. As a result,
pipsuccessfully upgrades the pure-Python files ofcffito2.1.0, but cannot build or update the binary backend (_cffi_backend.so), which remains at version2.0.0(provided by the HA OS core image).This creates a fatal version mismatch in the Python environment, causing any integration relying on
cffi(such as the built-insnoointegration, custom components likegoogle_home, and potentially many others usingcryptographyorpycryptodome) to fail to setup on startup with the following exception:Suggested Fix
To prevent breaking other core and custom integrations on Home Assistant, the integration should pin or check
cffipackage versions, or avoid upgrading core/system precompiled libraries. Alternatively, pinningcffi==2.0.0in the manifest/requirements when running under Home Assistant would avoid pulling the mismatched2.1.0package.