Asynchronous Python client for Modern Forms fans.
Project description
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())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aiomodernforms-0.1.7.tar.gz
(8.6 kB
view details)
Built Distribution
File details
Details for the file aiomodernforms-0.1.7.tar.gz
.
File metadata
- Download URL: aiomodernforms-0.1.7.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74c59fc954bc27af30a9c5d948aa9db9fcd9ccab3563013d3d473b777bea5c6f |
|
MD5 | f97e7fde129fdff3b5957b5676d0d3a0 |
|
BLAKE2b-256 | b9dfc2f6d13edec382f127ebc356eab7e7c8b2ef857eeda7aa9ce65c6521495c |
File details
Details for the file aiomodernforms-0.1.7-py3-none-any.whl
.
File metadata
- Download URL: aiomodernforms-0.1.7-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43e4a0f3bbd7fdb5318911245e1d30f14bbc8d780dc76c99a21bd4ec71a5ac5d |
|
MD5 | 64da0c4b33124637cf6e048c2604193d |
|
BLAKE2b-256 | c2ded892e9dbc8fc5fbf5a85f77f7b7c8fc8cc70dfd5e36b421b1a0842474bd5 |