Skip to main content

Python Wrapper for Homeassistant's REST API

Project description

HomeassistantAPI

Code Coverage PyPI - Downloads GitHub commits since latest release (by date including pre-releases) Read the Docs (version) GitHub release (latest by date)

Python wrapper for Homeassistant's REST API

Here is a quick example.

from homeassistant_api import Client

with Client(
    '<API Server URL>',
    '<Your Long Lived Access-Token>'
) as client:

    light = client.get_domain("light")

    light.turn_on(entity_id="light.living_room_lamp")

All the methods also support async! Just prefix the method with async_ (i.e. await light.async_turn_on(...)).

Documentation

All documentation, API reference, contribution guidelines and pretty much everything else you'd want to know is on our readthedocs site here

If there is something missing, open an issue and let us know! Thanks!

Go make some cool stuff! Maybe come back and tell us about it in a discussion? We'd love to hear about how you use our library!!

License

This project is under the GNU GPLv3 license, as defined by the Free Software Foundation.

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-4.2.2.post1.tar.gz (26.4 kB view hashes)

Uploaded Source

Built Distribution

homeassistant_api-4.2.2.post1-py3-none-any.whl (33.7 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