Frigidaire Python API
A Python client for the Frigidaire 2.0 (Electrolux) cloud API, reverse-engineered from the mobile app. It drives Frigidaire Wi-Fi air conditioners and dehumidifiers, and is the library behind the Home Assistant Frigidaire integration.
There are two clients with the same commands and the same appliance snapshots:
Frigidaire(username, password, ...), the synchronous client. It is unchanged from 1.0, so existing code keeps working as it is.AsyncFrigidaire(backend), the async client, new in 1.1. It is built from a backend, the way the account signs in;PasswordBackendsigns in with the email and password of the Frigidaire app. New code, and anything running on an event loop, should use it.
Quickstart: the sync client
from frigidaire import Frigidaire, JsonFileSessionStore, Mode
client = Frigidaire("email", "password", session_store=JsonFileSessionStore("session.json"))
for appliance in client.get_appliances():
print(appliance, appliance.state, appliance.mode, appliance.ambient_temperature, appliance.temperature_unit)
ac = client.get_appliances()[0]
client.set_mode(ac, Mode.COOL)
client.set_temperature(ac, 72)
The constructor signs in, and every call blocks while it makes its HTTP requests.
Quickstart: the async client
import asyncio
from frigidaire import AsyncFrigidaire, JsonFileSessionStore, Mode, PasswordBackend
async def main() -> None:
backend = PasswordBackend("email", "password", session_store=JsonFileSessionStore("session.json"))
client = AsyncFrigidaire(backend)
await client.connect()
for appliance in await client.get_appliances():
print(appliance, appliance.state, appliance.mode, appliance.ambient_temperature, appliance.temperature_unit)
ac = (await client.get_appliances())[0]
await client.set_mode(ac, Mode.COOL)
await client.set_temperature(ac, 72)
ac = await client.refresh(ac)
await client.close()
asyncio.run(main())
PasswordBackend takes the same arguments as the sync client. It runs the same blocking HTTP code
on a worker thread, so it never stalls the event loop, and it shares each account's write
throttle and re-authentication lock with any sync client in the same process. It has no live
updates: poll get_appliances(), or refresh(appliance) for one appliance. client.listen()
raises NotImplementedError on it.
Appliances and commands
get_appliances() returns a fresh Appliance snapshot per appliance on every call. The typed
accessors (state, mode, mode_state, target_temperature, humidity, bucket_full,
filter_needs_attention, is_connected, wifi_rssi, ...) parse the reported properties and
return None when the model does not report the value. appliance.get("someKey") reads anything
they do not cover.
The set_* commands encode the protocol's ordering quirks (power-on before mode, re-sending the
setpoint after a cold start, entering Dry mode before setting a humidity target), so callers only
express intent. Each sequence is written once, as a planner in frigidaire.model
(plan_set_mode(appliance, mode) and so on, which return the actions to send in order), and both
clients send those plans one property per request, so they put the same requests on the wire.
On heat-capable air conditioners, use client.set_mode(ac, Mode.HEAT) (awaited on the async
client). Both mode and mode_state recognize HEAT regardless of firmware casing. Availability
depends on the appliance; recognizing the wire value does not imply that every air conditioner
supports heating.
Sessions and the active-session cap
Electrolux caps the number of active sessions per account (cas_3403). Pass a session_store
(to Frigidaire or to PasswordBackend) so a still-valid session survives restarts instead of
lingering server-side. SessionCapError is raised when the cap is hit; back off and retry on the
same session. AuthenticationError means the credentials were rejected and retrying will not
help. Every error is a FrigidaireException, with status_code and error_code when the API
answered.
See docs/RATE_LIMITING_AND_TIMEOUTS.md for write throttling and timeouts.
Testing downstream code
frigidaire.testing ships fakes for both clients and real sample records for a legacy window AC
(LEGACY_AC), a newer portable AC (TELICA_AC) and a dehumidifier (DEHUMIDIFIER), with
with_reported(record, **changes) to vary them.
FakeFrigidaire(records)is the syncFrigidairewith the HTTP layer replaced, unchanged from 1.0: it serves canned appliance records and records every(setting, value)it would have sent incommands. Seterrorto make the next fetch fail;fetch_countcounts fetch attempts.FakeBackend(records)is a backend with no network. It records every(key, value)it would have sent incommands. Seterrorto make connects and fetches fail,command_errorto make commands fail, andsupports_live_updatestoTrueto drivelisten()withawait backend.push(record).FakeAsyncFrigidaire(records)returnsAsyncFrigidaire(FakeBackend(records)); the fake isclient.backend.
Both run the real command plans and parsing unchanged.
Metadata
Release files for frigidaire 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| frigidaire-1.1.0.tar.gz | 44.6 kB | Without provenance | Details for frigidaire-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| frigidaire-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for frigidaire-1.1.0-py3-none-any.whl |
Total release size: 83.8 kB
Release files / frigidaire-1.1.0.tar.gz
| Download URL | frigidaire-1.1.0.tar.gz |
|---|---|
| Size | 44.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5ebde553cbf18480c77df33bcdf3393a265eea4c395109d0a7b30fc1b3c274db
|
|
BLAKE2b-256 checksum How to use checksums |
5286de172f08f29494bce11c79d3f3ba1f7e4f034d30f719ad4ea371b7cb3fe8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.2
|
Release files / frigidaire-1.1.0-py3-none-any.whl
| Download URL | frigidaire-1.1.0-py3-none-any.whl |
|---|---|
| Size | 39.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
762c72db302d7aef3ae4f54729319df950a7d2b47ea8e41f89703fb4007e7846
|
|
BLAKE2b-256 checksum How to use checksums |
07c9b780c7dec9ebde2e02ae17080d9ee1621eb1372551fc9e536582afa21c49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.2
|
Security for frigidaire 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.