Skip to main content

A library to pilot hitachi aircloud AC

Project description

aircloudy

PyPI - Version PyPI - Python Version

Aircloudy is an unofficial python library that allow management of RAC (Room Air Conditioner) compatible with Hitachi Air Cloud.

This project IS NOT endorsed by Hitachi and is distributed as-is without warranty.


Table of Contents

Installation

pip install aircloudy

Usage

import asyncio
from typing import Tuple, Optional
from aircloudy import HitachiAirCloud, InteriorUnit, compute_interior_unit_diff_description


def print_changes(dict: dict[int, Tuple[Optional[InteriorUnit], Optional[InteriorUnit]]]) -> None:
    for (id, change) in dict.items():
        print(f"Change on interior unit {id}: "+compute_interior_unit_diff_description(change[0], change[1]))

async def main() -> None:
    async with HitachiAirCloud("your@email.com", "top_secret") as ac:
        ac.on_change = print_changes

        unit_bureau = next((iu for iu in ac.interior_units if iu.name == "Bureau"), None)
        if unit_bureau is None:
            raise Exception("No unit named `Bureau`")

        await ac.set_power(unit_bureau, "ON")
        await ac.set(unit_bureau.copy(requested_temperature=21, fan_speed="LV3"))

        await asyncio.sleep(30)


asyncio.run(main())

License

aircloudy is distributed under modified HL3 license. See LICENSE.txt.

Development

poetry run task lint
poetry run task check
poetry run task test
poetry run task coverage

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

aircloudy-0.1.1.tar.gz (44.0 kB view details)

Uploaded Source

Built Distribution

aircloudy-0.1.1-py3-none-any.whl (26.3 kB view details)

Uploaded Python 3

File details

Details for the file aircloudy-0.1.1.tar.gz.

File metadata

  • Download URL: aircloudy-0.1.1.tar.gz
  • Upload date:
  • Size: 44.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.2 Darwin/23.2.0

File hashes

Hashes for aircloudy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 86cb4c8d617ff36bd50e29ad0076f8f3840ffa904ae05cd4a92b94a26e5304ab
MD5 52f1055dcf876a4ffa2e66b064888d3b
BLAKE2b-256 b755c339c3dc8a94baa1dee9a83c0861ae9bd3efeebe250dce2d631aff8a4332

See more details on using hashes here.

File details

Details for the file aircloudy-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: aircloudy-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 26.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.2 Darwin/23.2.0

File hashes

Hashes for aircloudy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9ed265fb6844918c19af98dfcaf83f66d39e752ae6f967c7b2c8bc0c5a1857a9
MD5 4571c9c37721a3ea4d662b7f422b1b01
BLAKE2b-256 2b892408fc4a9484bd5ce4b4878c6fb36479625b7e4406ac434eb3f8c38c148a

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