diff --git a/atom.xml b/atom.xml index f6a5083f89..58d3171bb2 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Home Assistant]]> - 2017-06-06T19:17:18+00:00 + 2017-06-07T05:17:15+00:00 https://home-assistant.io/ diff --git a/blog/categories/announcements/atom.xml b/blog/categories/announcements/atom.xml index a22bcc50ec..6aef3a0a07 100644 --- a/blog/categories/announcements/atom.xml +++ b/blog/categories/announcements/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Announcements | Home Assistant]]> - 2017-06-06T19:17:18+00:00 + 2017-06-07T05:17:15+00:00 https://home-assistant.io/ diff --git a/blog/categories/community/atom.xml b/blog/categories/community/atom.xml index fadaf0e554..fa37228f80 100644 --- a/blog/categories/community/atom.xml +++ b/blog/categories/community/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Community | Home Assistant]]> - 2017-06-06T19:17:18+00:00 + 2017-06-07T05:17:15+00:00 https://home-assistant.io/ diff --git a/blog/categories/device-tracking/atom.xml b/blog/categories/device-tracking/atom.xml index 78c385845d..edb4707b3f 100644 --- a/blog/categories/device-tracking/atom.xml +++ b/blog/categories/device-tracking/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Device-Tracking | Home Assistant]]> - 2017-06-06T19:17:18+00:00 + 2017-06-07T05:17:15+00:00 https://home-assistant.io/ diff --git a/blog/categories/esp8266/atom.xml b/blog/categories/esp8266/atom.xml index b503d6fc34..9b68c2b22d 100644 --- a/blog/categories/esp8266/atom.xml +++ b/blog/categories/esp8266/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: ESP8266 | Home Assistant]]> - 2017-06-06T19:17:18+00:00 + 2017-06-07T05:17:15+00:00 https://home-assistant.io/ diff --git a/blog/categories/how-to/atom.xml b/blog/categories/how-to/atom.xml index 98ac813a4f..9405c56bd3 100644 --- a/blog/categories/how-to/atom.xml +++ b/blog/categories/how-to/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: How-To | Home Assistant]]> - 2017-06-06T19:17:18+00:00 + 2017-06-07T05:17:15+00:00 https://home-assistant.io/ diff --git a/blog/categories/ibeacons/atom.xml b/blog/categories/ibeacons/atom.xml index c87e89be34..1e12372fce 100644 --- a/blog/categories/ibeacons/atom.xml +++ b/blog/categories/ibeacons/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: iBeacons | Home Assistant]]> - 2017-06-06T19:17:18+00:00 + 2017-06-07T05:17:15+00:00 https://home-assistant.io/ diff --git a/blog/categories/internet-of-things/atom.xml b/blog/categories/internet-of-things/atom.xml index c91c1d052c..8974346b45 100644 --- a/blog/categories/internet-of-things/atom.xml +++ b/blog/categories/internet-of-things/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Internet-of-Things | Home Assistant]]> - 2017-06-06T19:17:18+00:00 + 2017-06-07T05:17:15+00:00 https://home-assistant.io/ diff --git a/blog/categories/iot-data/atom.xml b/blog/categories/iot-data/atom.xml index 38b1390348..c823abc62f 100644 --- a/blog/categories/iot-data/atom.xml +++ b/blog/categories/iot-data/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: IoT-Data | Home Assistant]]> - 2017-06-06T19:17:18+00:00 + 2017-06-07T05:17:15+00:00 https://home-assistant.io/ diff --git a/blog/categories/merchandise/atom.xml b/blog/categories/merchandise/atom.xml index 21ec41e5e4..dbfa1f27aa 100644 --- a/blog/categories/merchandise/atom.xml +++ b/blog/categories/merchandise/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Merchandise | Home Assistant]]> - 2017-06-06T19:17:18+00:00 + 2017-06-07T05:17:15+00:00 https://home-assistant.io/ diff --git a/blog/categories/micropython/atom.xml b/blog/categories/micropython/atom.xml index 42370b7ecf..7642153853 100644 --- a/blog/categories/micropython/atom.xml +++ b/blog/categories/micropython/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Micropython | Home Assistant]]> - 2017-06-06T19:17:18+00:00 + 2017-06-07T05:17:15+00:00 https://home-assistant.io/ diff --git a/blog/categories/mqtt/atom.xml b/blog/categories/mqtt/atom.xml index 8f6b2852cf..7933580138 100644 --- a/blog/categories/mqtt/atom.xml +++ b/blog/categories/mqtt/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: MQTT | Home Assistant]]> - 2017-06-06T19:17:18+00:00 + 2017-06-07T05:17:15+00:00 https://home-assistant.io/ diff --git a/blog/categories/organisation/atom.xml b/blog/categories/organisation/atom.xml index 95f8d648af..d4b73f3698 100644 --- a/blog/categories/organisation/atom.xml +++ b/blog/categories/organisation/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Organisation | Home Assistant]]> - 2017-06-06T19:17:18+00:00 + 2017-06-07T05:17:15+00:00 https://home-assistant.io/ diff --git a/blog/categories/owntracks/atom.xml b/blog/categories/owntracks/atom.xml index a1ed08cd16..8c0e736584 100644 --- a/blog/categories/owntracks/atom.xml +++ b/blog/categories/owntracks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: OwnTracks | Home Assistant]]> - 2017-06-06T19:17:18+00:00 + 2017-06-07T05:17:15+00:00 https://home-assistant.io/ diff --git a/blog/categories/presence-detection/atom.xml b/blog/categories/presence-detection/atom.xml index 2c975e1c5f..79f36a4262 100644 --- a/blog/categories/presence-detection/atom.xml +++ b/blog/categories/presence-detection/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Presence-Detection | Home Assistant]]> - 2017-06-06T19:17:18+00:00 + 2017-06-07T05:17:15+00:00 https://home-assistant.io/ diff --git a/blog/categories/public-service-announcement/atom.xml b/blog/categories/public-service-announcement/atom.xml index 9a5687d2ac..82edafef7d 100644 --- a/blog/categories/public-service-announcement/atom.xml +++ b/blog/categories/public-service-announcement/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Public-Service-Announcement | Home Assistant]]> - 2017-06-06T19:17:18+00:00 + 2017-06-07T05:17:15+00:00 https://home-assistant.io/ diff --git a/blog/categories/release-notes/atom.xml b/blog/categories/release-notes/atom.xml index d79610f2de..fbcbac555c 100644 --- a/blog/categories/release-notes/atom.xml +++ b/blog/categories/release-notes/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Release-Notes | Home Assistant]]> - 2017-06-06T19:17:18+00:00 + 2017-06-07T05:17:15+00:00 https://home-assistant.io/ diff --git a/blog/categories/survey/atom.xml b/blog/categories/survey/atom.xml index 9978a3664e..f4d7d619bd 100644 --- a/blog/categories/survey/atom.xml +++ b/blog/categories/survey/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Survey | Home Assistant]]> - 2017-06-06T19:17:18+00:00 + 2017-06-07T05:17:15+00:00 https://home-assistant.io/ diff --git a/blog/categories/talks/atom.xml b/blog/categories/talks/atom.xml index 183d57400f..7ad3732ff1 100644 --- a/blog/categories/talks/atom.xml +++ b/blog/categories/talks/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Talks | Home Assistant]]> - 2017-06-06T19:17:18+00:00 + 2017-06-07T05:17:15+00:00 https://home-assistant.io/ diff --git a/blog/categories/technology/atom.xml b/blog/categories/technology/atom.xml index 8a1bb2ed44..f5f015754d 100644 --- a/blog/categories/technology/atom.xml +++ b/blog/categories/technology/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Technology | Home Assistant]]> - 2017-06-06T19:17:18+00:00 + 2017-06-07T05:17:15+00:00 https://home-assistant.io/ diff --git a/blog/categories/user-stories/atom.xml b/blog/categories/user-stories/atom.xml index 4ffa39c89f..b9cb1ea1fc 100644 --- a/blog/categories/user-stories/atom.xml +++ b/blog/categories/user-stories/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: User-Stories | Home Assistant]]> - 2017-06-06T19:17:18+00:00 + 2017-06-07T05:17:15+00:00 https://home-assistant.io/ diff --git a/blog/categories/video/atom.xml b/blog/categories/video/atom.xml index a5c7b85718..e5816a3ee2 100644 --- a/blog/categories/video/atom.xml +++ b/blog/categories/video/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Video | Home Assistant]]> - 2017-06-06T19:17:18+00:00 + 2017-06-07T05:17:15+00:00 https://home-assistant.io/ diff --git a/blog/categories/website/atom.xml b/blog/categories/website/atom.xml index 1983c146d3..c6a1ae21c9 100644 --- a/blog/categories/website/atom.xml +++ b/blog/categories/website/atom.xml @@ -4,7 +4,7 @@ <![CDATA[Category: Website | Home Assistant]]> - 2017-06-06T19:17:18+00:00 + 2017-06-07T05:17:15+00:00 https://home-assistant.io/ diff --git a/developers/python_api/index.html b/developers/python_api/index.html index 2a507fe68a..03561eac0f 100644 --- a/developers/python_api/index.html +++ b/developers/python_api/index.html @@ -66,8 +66,8 @@
-

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

-

Note: This page is not full documentation for this API, but a collection of examples showing its use.

+

See the developer documentation for a full overview of the documentation. The rest of this page will contain examples on how to use it.

+

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

A simple way to get all current entities is to visit the “Set State” page in the “Developer Tools”. For the examples below just choose one from the available entries. Here the sensor sensor.office_temperature and the switch switch.livingroom_pin_2 are used.

First import the module and setup the basics:

import homeassistant.remote as remote
@@ -76,15 +76,6 @@
 print(remote.validate_api(api))
 
-

Here’s another way to use the homeassistant.remote package:

-
import homeassistant.remote as remote
-
-api = remote.API('127.0.0.1', 'password')
-hass = remote.HomeAssistant(api)
-hass.start()
-living_room = hass.states.get('group.living_room')
-
-

Get configuration

Get the current configuration of a Home Assistant instance:

import homeassistant.remote as remote
@@ -122,7 +113,7 @@
 
 api = remote.API('127.0.0.1', 'YOUR_PASSWORD')
 office_temperature = remote.get_state(api, 'sensor.office_temperature')
-print('{} is {} {}.'.format(office_temperature.attributes['friendly_name'],
+print('{} is {} {}.'.format(office_temperature.name,
                             office_temperature.state,
                             office_temperature.attributes['unit_of_measurement']
                             )
@@ -138,7 +129,7 @@
 
 api = remote.API('127.0.0.1', 'YOUR_PASSWORD')
 switch_livingroom = remote.get_state(api, 'switch.livingroom_pin_2')
-print('{} is {}.'.format(switch_livingroom.attributes['friendly_name'],
+print('{} is {}.'.format(switch_livingroom.name,
                          switch_livingroom.state
                          )
       )
@@ -214,7 +205,6 @@ longer timeout.

remote.call_service(api, domain, 'jabber', data)
-

For more details, please check the source of homeassistant.remote.