Skip to main content

Asynchronous Python client for Modern Forms fans.

Project description

Python: Async IO Modern Forms API Client

GitHub Workflow Status Codecov License: MIT PyPI

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


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.4.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

aiomodernforms-0.1.4-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file aiomodernforms-0.1.4.tar.gz.

File metadata

  • Download URL: aiomodernforms-0.1.4.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for aiomodernforms-0.1.4.tar.gz
Algorithm Hash digest
SHA256 4c2f6b866593be13ad393f4ca2800d1f6428707d80910d0a5b9c3032cdbbb0dd
MD5 3a161e58370d8b3966dc253baf1fea5f
BLAKE2b-256 36ef5d19f7fa6ddde6265ed303d5b792caa57291d6e7d24ee43ac9290106cd23

See more details on using hashes here.

File details

Details for the file aiomodernforms-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: aiomodernforms-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for aiomodernforms-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fe1d0952e0783013a97de8b101b196cfac4a5ce6254a7e0441fd4460685e2196
MD5 48b91245661ab480e8b67a737324f3f1
BLAKE2b-256 0fc831bfa332bae028682d2b424c897d9277218ef40d66c2e25d32e3e15068c2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page