Python: Async IO Modern Forms API Client
Asynchronous Python client for Modern Forms Fans.
About
This package allows you to control and monitor Modern Forms fans programmatically. It is mainly created to allow third-party programs to automate the behavior of the Modern Forms fans
Installation
pip install aiomodernforms
Usage
"""Asynchronous Python client for Async IO Modern Forms fan."""
import asyncio
from datetime import datetime, timedelta
import aiomodernforms
from aiomodernforms.const import LIGHT_POWER_ON
async def main():
"""Turn on the fan light."""
async with aiomodernforms.ModernFormsDevice("192.168.3.197") as fan:
await fan.update()
print(fan.status)
await fan.light(
on=LIGHT_POWER_ON,
brightness=50,
sleep=datetime.now() + timedelta(minutes=2),
)
print(fan.status)
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
Reporting compatibility issues
WAC and Modern Forms fans span several hardware generations, and not every
generation behaves identically. If this library doesn't work correctly
against your fan, run diagnose.py against it and paste the output into a
GitHub issue:
python diagnose.py <fan-ip-address>
# or, from a checkout with a dev environment set up:
make diagnose HOST=<fan-ip-address>
This prints a Markdown report — parsed capability flags, the raw API responses, and any response fields this library doesn't recognize yet — that helps pinpoint model/generation differences. It redacts your account email, AWS identity, MAC address, device name, and certificate ID, and never includes the fan's IP address, so the output is safe to paste as-is. Still, give it a quick read before posting.
Mock fan for development
To develop or test a client (such as a Home Assistant integration) against this API without real hardware, run a mock fan that speaks the same wire protocol:
python -m mock_fan --generation gen3 --breeze --port 8080
# or
make mock-fan GENERATION=gen1_2 PORT=8081
--generation is gen1_2 or gen3 and is required; --breeze optionally
enables breeze/wind mode support; --no-light simulates a fan-only unit
with no light kit (light is on by default). Point your client at the
printed host/port exactly as you would a real fan.
For Gen4, use --generation gen4 --lights N (--breeze/--no-light don't apply —
Gen4 always exposes breeze fields on the fan fixture, and light count is controlled
by --lights, default 1; --lights 0 simulates a fan with no light kit).
Metadata
Release files for aiomodernforms 0.3.1
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 |
|---|---|---|---|---|
| aiomodernforms-0.3.1.tar.gz | 34.1 kB | Without provenance | Details for aiomodernforms-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aiomodernforms-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for aiomodernforms-0.3.1-py3-none-any.whl |
Total release size: 55.7 kB
Release files / aiomodernforms-0.3.1.tar.gz
| Download URL | aiomodernforms-0.3.1.tar.gz |
|---|---|
| Size | 34.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a6fb198c573ec4eb3da0dd4b45b9209cad0294bcf92e0c9cd77bc9a93613fc68
|
|
BLAKE2b-256 checksum How to use checksums |
c87e332fc1c2c06dfc2ab73d0ec27085ab4da1012a7e2f094e38e71c10e668bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / aiomodernforms-0.3.1-py3-none-any.whl
| Download URL | aiomodernforms-0.3.1-py3-none-any.whl |
|---|---|
| Size | 21.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
895bc52d4c07547cd22056c5b9ef2787eb78b40bd0bee461362672f8764ef991
|
|
BLAKE2b-256 checksum How to use checksums |
eff957d5b2e42932bc15a3d5c9751767b3112ff9c16b8bdfcbe93838a97c897f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for aiomodernforms 0.3.1
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.