MirAIe-AC API for Python
Project description
MirAIe API for Python
Installation
pip install miraie-ac
Get started
import asyncio
from miraie_ac import MirAIeHub, MirAIeBroker
async def setup():
# Instantiate a MirAIeHub object
broker = MirAIeBroker()
# Instantiate a MirAIeHub object
hub = MirAIeHub()
# Intialize the hub (+91xxxxxxxxxx, password, broker)
await hub.init("<mobile>", "<password>", broker)
# Display list of available devices
print( hub.home.devices )
# Wait till connection has been established with the broker
async def waitForClient():
while not hasattr(broker, 'client') or getattr(broker, 'client') is None:
await asyncio.sleep(1)
await waitForClient()
# Now you can run any operation on the device(s)
hub.home.devices[0].turn_off()
asyncio.run(setup())
Logs can be enabled in Home Assistant as follows
logger:
...
logs:
...
custom_components.miraie: debug
...
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
miraie_ac-1.0.5.tar.gz
(8.2 kB
view hashes)
Built Distribution
miraie_ac-1.0.5-py3-none-any.whl
(10.6 kB
view hashes)
Close
Hashes for miraie_ac-1.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7055fb1a196fc1e6c357eb86fdb6feb6909afbe16eb578ebb2b30e48c495a7f3 |
|
MD5 | 7985c6f145ae470ff3220b1100b79512 |
|
BLAKE2b-256 | e74c3ed828b329273d514696065746740dc85a9038fae2da47500f7edcdcc3e0 |