Integration with Eaton xComfort Bridge
Project description
xcomfort-python
Unofficial python package for communicating with Eaton xComfort Bridge
Usage
import asyncio
from xcomfort import Bridge
def observe_device(device):
device.state.subscribe(lambda state: print(f"Device state [{device.device_id}] '{device.name}': {state}"))
async def main():
bridge = Bridge(<ip_address>, <auth_key>)
runTask = asyncio.create_task(bridge.run())
devices = await bridge.get_devices()
for device in devices.values():
observe_device(device)
# Wait 50 seconds. Try flipping the light switch manually while you wait
await asyncio.sleep(50)
# Turn off all the lights.
# for device in devices.values():
# await device.switch(False)
#
# await asyncio.sleep(5)
await bridge.close()
await runTask
asyncio.run(main())
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
xcomfort-0.0.12.tar.gz
(6.6 kB
view hashes)
Built Distribution
Close
Hashes for xcomfort-0.0.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39893a04227a7e56d8bd78c47502930c949df3ecd10195e45b63fce768e10874 |
|
MD5 | 0c3b06f04bc4a59db30f6d8c1d3a2456 |
|
BLAKE2b-256 | af70eaba8ee41a06d937bb1e4e10e3df5431c721ffe8cb94d7a8cdebf48b813b |