Library for interacting with millheat api
Project description
pymillheat
Python3 wrapper for interacting with millheat api.
Features:
- Temperature readings.
- Ability to change set temperature.
- Turn the device on/off.
- Device ID, room ID, user ID.
Install
pip3 install pymillheat
Example
import pymillheat
import asyncio
async def main():
await mill.open_connection()
mill.access_token
mill.authorization_code
mill.refresh_token
await mill.refresh_access_token()
await mill.get_home_list()
mill.homes_information
await mill.get_room_by_home(home_id)
mill.rooms_information
await mill.get_device_by_room(room_id)
mill.devices_information
await mill.get_independent_devices(home_id)
mill.independent_devices_information
await mill.switch_control_device(device_id, status, retry=1)
await mill.temperature_control_device(device_id, status, hold_temp=None, retry=1)
if __name__ == "__main__":
loop = asyncio.get_event_loop()
mill = Mill(
access_key="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
secret_token="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
username="example@mail.com",
password="password123",
loop=loop,
)
try:
loop.run_until_complete(main())
except (KeyboardInterrupt, SystemExit):
pass
finally:
loop.run_until_complete(mill.close_connection())
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
pymillheat-1.0.4.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for pymillheat-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fa6cf8692a5edf3fb298bc7b3dce9dfa3399aa4ed1828c410d3b12d23a04534 |
|
MD5 | a0691f1faebdaf25605674f3c3759d7b |
|
BLAKE2b-256 | 1f0ec2d7abb07cf5e056ae4fe213ba6d1bc1b4d06637759cb084ba6eb5177b13 |