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.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78112940c77dfa7b466d349fb2acc426097c35f01ce53bf8050fc50d0e61c0fb |
|
MD5 | 3c31b179fa47d6c2553bbd46050d9468 |
|
BLAKE2b-256 | b2b2677cb335d7fa7a5981a92923465183ff30575b04d2a3419b6523db61318c |