Python Wrapper for Homeassistant's REST API
Project description
HomeassistantAPI
Python Wrapper for Homeassistant's REST API
Installation
There are a variety of ways to install this wrapper.
Using pip
from PYPI
$ pip install homeassistant_api
Using Source from GitHub
$ git clone https://github.com/GrandMoff100/HomeassistantAPI
$ cd HomeassistantAPI
$ python setup.py install
Usage
See example.py
import os
from homeassistant_api import Client
url = os.getenv('HOMEASSISTANT_API_ENDPOINT') # http://localhost:8123/api/
token = os.getenv('HOMEASSISTANT_TOKEN') # ey816najgfjassf...
client = Client(url, token)
servicedomains = client.get_services()
servicedomains.light.turn_off.trigger(entity_id='light.living_room') # Sends a request to turn off the living room light
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
Close
Hashes for HomeAssistant_API-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 652fc577c9b97910f771f5ce02d2377f34adb6345312b438f34b3e4170240ec7 |
|
MD5 | 6ff9b2122354ea32741b5363e62c96f3 |
|
BLAKE2b-256 | 2f037f48e9bd7b1a2af1302d48e1c35efca88dd4464b31558e8a9dbb34e15aed |