Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

HomeAssistant API-0.0.2.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

HomeAssistant_API-0.0.2-py3-none-any.whl (11.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page