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

Uploaded Source

Built Distribution

aiomodernforms-0.1.3-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

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

Hashes for aiomodernforms-0.1.3.tar.gz
Algorithm Hash digest
SHA256 cb20f3c3bd14150f20ba27116048d5892cd97808be647a9ad3831e5f617a5623
MD5 12c2322276c198d4ecc3d1a774a33955
BLAKE2b-256 a759563e67ca050c037be044199226a571b90abba1aa28e769cca165d9e4609c

See more details on using hashes here.

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

Hashes for aiomodernforms-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2a8dd1a9f1f02215bf39e00b984773285f8b899d3f169aecf4b16f9a7051979a
MD5 ec89f73c8900855745c2654e9330c742
BLAKE2b-256 7280943b29d313a3b38816a24094efebf0c9f3919530ca49539a940979ec9c2f

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