mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-05-02 09:17:35 +00:00
785 B
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')