Asynchronous Python library for Panasonic Comfort Cloud API
Project description
aio-panasonic-comfort-cloud
aio-panasonic-comfort-cloud: Asynchronous Python library for Panasonic Comfort Cloud API
This library provides asynchronous access to the Panasonic Comfort Cloud API, enabling developers to interact with Panasonic air conditioning units.
Installation
pip install aio-panasonic-comfort-cloud
Quick Start
Basic Usage
import asyncio
import aiohttp
from aio_panasonic_comfort_cloud import ApiClient
async def main():
async with aiohttp.ClientSession() as session:
client = ApiClient("your_email@example.com", "your_password", session)
# Start the session (authenticate and fetch devices)
await client.start_session()
# Get list of devices
devices = client.get_devices()
for device_info in devices:
print(f"Device: {device_info.name}")
# Get full device status
device = await client.get_device(device_info)
params = device.parameters
print(f" Power: {params.power.name}")
print(f" Mode: {params.mode.name}")
print(f" Fan Speed: {params.fan_speed.name}")
print(f" Target Temp: {params.target_temperature}°C")
print(f" Inside Temp: {params.inside_temperature}°C")
# Clean up the session
await client.stop_session()
asyncio.run(main())
Controlling a Device
Use ChangeRequestBuilder for a fluent API to build and apply changes:
from aio_panasonic_comfort_cloud import ApiClient, ChangeRequestBuilder, constants
# ... (start session as above)
device = await client.get_device(devices[0])
builder = ChangeRequestBuilder(device)
builder.set_power_mode(constants.Power.On)
builder.set_hvac_mode(constants.OperationMode.Cool)
builder.set_target_temperature(24)
builder.set_fan_speed(constants.FanSpeed.Auto)
if builder.has_changes:
await client.set_device_raw(device, builder.build())
Available Enums
| Category | Values |
|---|---|
| Power | Off, On |
| OperationMode | Auto, Dry, Cool, Heat, Fan |
| FanSpeed | Auto, Low, LowMid, Mid, HighMid, High |
| EcoMode | Auto, Powerful, Quiet |
| AirSwingUD | Auto, Up, UpMid, Mid, DownMid, Down, Swing |
| AirSwingLR | Auto, Left, LeftMid, Mid, RightMid, Right, Unavailable |
| NanoeMode | Unavailable, Off, On, ModeG, All |
ChangeRequestBuilder Methods
set_power_mode(value)— Set power on/offset_hvac_mode(value)— Set operation mode (cool, heat, etc.)set_target_temperature(value)— Set target temperature in °Cset_fan_speed(value)— Set fan speedset_eco_mode(value)— Set eco modeset_horizontal_swing(value)— Set horizontal air swingset_vertical_swing(value)— Set vertical air swingset_nanoe_mode(value)— Set Nanoe modeset_eco_navi_mode(value)— Set EcoNavi modeset_eco_function_mode(value)— Set EcoFunction mode
Getting Energy History
from datetime import date
from aio_panasonic_comfort_cloud import constants
today = date.today().strftime("%Y%m%d")
history = await client.history(device_info.id, constants.DataMode.Day, today)
2FA / MFA Support
If your account has two-factor authentication enabled, pass the OTP code:
await client.start_session(otp_code="123456")
Full Example
See example.py for a complete working example.
License
MIT
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aio_panasonic_comfort_cloud-2026.6.0.tar.gz.
File metadata
- Download URL: aio_panasonic_comfort_cloud-2026.6.0.tar.gz
- Upload date:
- Size: 91.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57c1f32470bb14b3a09c07be5a3a33e11bcaac0c0365ae6e9cbc4a0054c892f0
|
|
| MD5 |
8c65fad47b14ed886d132ee2b4b15c2b
|
|
| BLAKE2b-256 |
1985e69aea724ccb3fe0a4a557050780c943ce27a0c6d42640bb4d4dc55306d0
|
Provenance
The following attestation bundles were made for aio_panasonic_comfort_cloud-2026.6.0.tar.gz:
Publisher:
python-publish.yml on sockless-coding/aio-panasonic-comfort-cloud
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aio_panasonic_comfort_cloud-2026.6.0.tar.gz -
Subject digest:
57c1f32470bb14b3a09c07be5a3a33e11bcaac0c0365ae6e9cbc4a0054c892f0 - Sigstore transparency entry: 1711460579
- Sigstore integration time:
-
Permalink:
sockless-coding/aio-panasonic-comfort-cloud@924187891060f51b78eee8a357dc03d7360286a0 -
Branch / Tag:
refs/tags/2026.6.0 - Owner: https://github.com/sockless-coding
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@924187891060f51b78eee8a357dc03d7360286a0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file aio_panasonic_comfort_cloud-2026.6.0-py3-none-any.whl.
File metadata
- Download URL: aio_panasonic_comfort_cloud-2026.6.0-py3-none-any.whl
- Upload date:
- Size: 99.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1182176c2b6c6909ef473be296476bcede6f318dc2381d541bfc592ad19a7475
|
|
| MD5 |
d3f29fde390b7734de54c9b7f817104a
|
|
| BLAKE2b-256 |
19285bda2ec5555ea23519428af533b2fe9d57de5a9b69b3ff99e2a32ca83542
|
Provenance
The following attestation bundles were made for aio_panasonic_comfort_cloud-2026.6.0-py3-none-any.whl:
Publisher:
python-publish.yml on sockless-coding/aio-panasonic-comfort-cloud
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aio_panasonic_comfort_cloud-2026.6.0-py3-none-any.whl -
Subject digest:
1182176c2b6c6909ef473be296476bcede6f318dc2381d541bfc592ad19a7475 - Sigstore transparency entry: 1711461218
- Sigstore integration time:
-
Permalink:
sockless-coding/aio-panasonic-comfort-cloud@924187891060f51b78eee8a357dc03d7360286a0 -
Branch / Tag:
refs/tags/2026.6.0 - Owner: https://github.com/sockless-coding
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@924187891060f51b78eee8a357dc03d7360286a0 -
Trigger Event:
release
-
Statement type: