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.3.tar.gz
(8.4 kB
view details)
Built Distribution
File details
Details for the file aiomodernforms-0.1.3.tar.gz
.
File metadata
- Download URL: aiomodernforms-0.1.3.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb20f3c3bd14150f20ba27116048d5892cd97808be647a9ad3831e5f617a5623 |
|
MD5 | 12c2322276c198d4ecc3d1a774a33955 |
|
BLAKE2b-256 | a759563e67ca050c037be044199226a571b90abba1aa28e769cca165d9e4609c |
File details
Details for the file aiomodernforms-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: aiomodernforms-0.1.3-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a8dd1a9f1f02215bf39e00b984773285f8b899d3f169aecf4b16f9a7051979a |
|
MD5 | ec89f73c8900855745c2654e9330c742 |
|
BLAKE2b-256 | 7280943b29d313a3b38816a24094efebf0c9f3919530ca49539a940979ec9c2f |