home-assistant.io/source/developers/python_api.markdown
2015-05-11 12:07:06 +02:00

785 B

layout title description date sidebar comments sharing footer
page Python API Home Assistant Python API documentation 2015-05-11 12:00 false false true true

In the package homeassistant.remote a Python API on top of the HTTP API can be found.

The two snippets below shows how to use the homeassistant.remote package:

import homeassistant.remote as remote

api = remote.API("host", "password")
living_room = remote.get_state(api, 'group.living_room')
import homeassistant.remote as remote

api = remote.API("host", "password")
hass = remote.HomeAssistant(api)
hass.start()
living_room = hass.states.get('group.living_room')