Async Python client for the Sharp COCORO Air EU cloud API
Project description
aiosharp-cocoro-air
Async Python client for the Sharp COCORO Air EU cloud API.
Designed as a standalone library for use by the Home Assistant core integration, but has no HA dependencies — pure Python + aiohttp.
Installation
pip install aiosharp-cocoro-air
Usage
import aiohttp
from aiosharp_cocoro_air import SharpCOCOROAir
async with SharpCOCOROAir(email, password) as client:
await client.authenticate()
devices = await client.get_devices()
for device in devices:
print(device.name, device.properties.temperature_c)
await client.power_on(devices[0])
await client.set_mode(devices[0], "auto")
await client.set_humidify(devices[0], True)
When used inside Home Assistant, pass the shared session:
async with SharpCOCOROAir(email, password, session=hass_session) as client:
...
Supported Devices
Sharp air purifiers sold in Europe that use the Sharp COCORO Air EU cloud (the same backend as the official Sharp Life AIR EU mobile app).
Note: This library has only been tested with the Sharp KI-N52 air purifier. It should work with other Sharp COCORO Air EU devices, but this is unconfirmed. If you have a different model, please open an issue with your results.
API
SharpCOCOROAir(email, password, session=None)
authenticate()— Full login sequence (OAuth + terminal registration + box pairing)get_devices()— Returnslist[Device]with decoded sensor datapower_on(device)/power_off(device)— Power controlset_mode(device, mode)— Set operation mode (auto,night,pollen,silent,medium,high,ai_auto,realize)set_humidify(device, on)— Toggle humidification
Models
Device— device identity, ECHONET addresses, and decoded propertiesDeviceProperties— temperature, humidity, power, dust, smell, PCI sensor, filter usage, operation mode, etc.
Exceptions
SharpAuthError— authentication failed (bad credentials or expired session)SharpConnectionError— network/connection errorSharpApiError— non-auth API error (4xx/5xx)
Development
pip install -e ".[dev]"
pytest tests/ -v
ruff check src/ tests/
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 aiosharp_cocoro_air-0.2.0.tar.gz.
File metadata
- Download URL: aiosharp_cocoro_air-0.2.0.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1870746d9f3292b45c2c7be175fad4301d782b7bb8017b42c43245945be42ced
|
|
| MD5 |
d8e7689a03693823e512cb21fbba887d
|
|
| BLAKE2b-256 |
d1c850732aafaaf132c35c881f747ca8be83a5c6995f980169b278cfd48ec753
|
Provenance
The following attestation bundles were made for aiosharp_cocoro_air-0.2.0.tar.gz:
Publisher:
publish.yml on rsokolowski/aiosharp-cocoro-air
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aiosharp_cocoro_air-0.2.0.tar.gz -
Subject digest:
1870746d9f3292b45c2c7be175fad4301d782b7bb8017b42c43245945be42ced - Sigstore transparency entry: 1090671674
- Sigstore integration time:
-
Permalink:
rsokolowski/aiosharp-cocoro-air@e0695d60f1d8d0059276fb3b852b58736b6a1cb2 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/rsokolowski
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e0695d60f1d8d0059276fb3b852b58736b6a1cb2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file aiosharp_cocoro_air-0.2.0-py3-none-any.whl.
File metadata
- Download URL: aiosharp_cocoro_air-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0027952f030e885309ccd0e8cb69b79760f07db62dde9608931e86063acf7600
|
|
| MD5 |
ceb90927631768144a7b637f2f98bf71
|
|
| BLAKE2b-256 |
0e4f31818486c29316e2667afcc074dda68eb651ac2efbae2ea0975021bb5da0
|
Provenance
The following attestation bundles were made for aiosharp_cocoro_air-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on rsokolowski/aiosharp-cocoro-air
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aiosharp_cocoro_air-0.2.0-py3-none-any.whl -
Subject digest:
0027952f030e885309ccd0e8cb69b79760f07db62dde9608931e86063acf7600 - Sigstore transparency entry: 1090671747
- Sigstore integration time:
-
Permalink:
rsokolowski/aiosharp-cocoro-air@e0695d60f1d8d0059276fb3b852b58736b6a1cb2 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/rsokolowski
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e0695d60f1d8d0059276fb3b852b58736b6a1cb2 -
Trigger Event:
push
-
Statement type: