diff --git a/atom.xml b/atom.xml index a7c1843b14..faf3b4bac8 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@
In the package homeassistant.remote
a Python API on top of the HTTP API can be found.
This page is not a full documentation it’s more a collection of some example. 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.
Note: This page is not full documentation for this API, but a collection of examples showing its use.
-First import the module and setup the basics.
+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
@@ -102,7 +104,7 @@
This snippets shows how to use the homeassistant.remote
package in another way.
Here’s another way to use the homeassistant.remote
package:
import homeassistant.remote as remote
@@ -115,7 +117,7 @@
Get configuration
-Get the current configuration of a Home Asssitant instance.
+Get the current configuration of a Home Assistant instance:
import homeassistant.remote as remote
@@ -127,7 +129,7 @@
Get details about services, events, and entitites
-Similar to the output in the “Developer Tools” of the frontend.
+The output from this is similar to the output you’d find via the frontend, using the DevTools console.
import homeassistant.remote as remote
@@ -152,7 +154,7 @@
Get the state of an entity
-To get the details of a single entity the get_state
method is used.
+To get the details of a single entity, use get_state
:
import homeassistant.remote as remote
@@ -166,13 +168,13 @@
-The output is composed out of the details which are stored for this entity.
+This outputs the details which are stored for this entity, ie:
Office Temperature is 19 °C.
-The exact same thing is working for a switch. The difference is that both entities have different attributes.
+Switches work the same way. The only difference is that both entities have different attributes.
import homeassistant.remote as remote
@@ -187,7 +189,7 @@
Set the state of an entity
-Of course, it’s possible to set the state.
+Of course, it’s possible to set the state as well:
import homeassistant.remote as remote
from homeassistant.const import STATE_ON
@@ -198,11 +200,11 @@
-The state will be set to those value until the next update occurs.
+The state will be set to the new values until the next update occurs.
Blinking all entites of a domain
-If you want to turn on all entities of a domain, just use a service which was retrieved by get_services
.
+If you want to turn on all entities of a domain, retrieve the service via get_services
and act on that:
import time
import homeassistant.remote as remote
@@ -218,7 +220,7 @@
Control a single entity
-To turn on or off a single switch. The ID of the entity is needed as attribute.
+To turn on or off a single switch, pass the ID of the entity:
import time
import homeassistant.remote as remote
@@ -235,9 +237,9 @@
Specify a timeout
-The default timeout for an API call with call_service
is 5 seconds. Service
+
The default timeout for an API call with call_service
is 5 seconds. Services
taking longer than this to return will raise
-homeassistant.exceptions.HomeAssistantError: Timeout
unless provided with a
+homeassistant.exceptions.HomeAssistantError: Timeout
, unless provided with a
longer timeout.
import homeassistant.remote as remote
@@ -259,7 +261,7 @@ longer timeout.
Send a notification
-The example uses the jabber notification platform to send a single message to the given recipient in the configuration.yaml
file.
+The example uses the Jabber notification platform to send a single message to the given recipient in the configuration.yaml
file:
import homeassistant.remote as remote
@@ -271,7 +273,7 @@ longer timeout.
-For more details please check the source of homeassistant.remote.
+For more details, please check the source of homeassistant.remote.
diff --git a/sitemap.xml b/sitemap.xml
index effac230f7..72f0dcbe91 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -2168,62 +2168,62 @@
https://home-assistant.io/demo/frontend.html
-2016-10-16T15:59:27+00:00
+2016-10-17T16:23:19+00:00
https://home-assistant.io/demo/index.html
-2016-10-16T15:59:27+00:00
+2016-10-17T16:23:19+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-event.html
-2016-10-16T15:59:27+00:00
+2016-10-17T16:23:19+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-info.html
-2016-10-16T15:59:27+00:00
+2016-10-17T16:23:19+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-service.html
-2016-10-16T15:59:27+00:00
+2016-10-17T16:23:19+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-state.html
-2016-10-16T15:59:27+00:00
+2016-10-17T16:23:19+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-template.html
-2016-10-16T15:59:27+00:00
+2016-10-17T16:23:19+00:00
https://home-assistant.io/demo/panels/ha-panel-history.html
-2016-10-16T15:59:27+00:00
+2016-10-17T16:23:19+00:00
https://home-assistant.io/demo/panels/ha-panel-iframe.html
-2016-10-16T15:59:27+00:00
+2016-10-17T16:23:19+00:00
https://home-assistant.io/demo/panels/ha-panel-logbook.html
-2016-10-16T15:59:27+00:00
+2016-10-17T16:23:19+00:00
https://home-assistant.io/demo/panels/ha-panel-map.html
-2016-10-16T15:59:27+00:00
+2016-10-17T16:23:19+00:00
https://home-assistant.io/googlef4f3693c209fe788.html
-2016-10-16T15:59:27+00:00
+2016-10-17T16:23:19+00:00
https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html
-2016-10-16T15:59:27+00:00
+2016-10-17T16:23:19+00:00
https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html
-2016-10-16T15:59:27+00:00
+2016-10-17T16:23:19+00:00
https://home-assistant.io/static/mdi-demo.html
-2016-10-16T15:59:27+00:00
+2016-10-17T16:23:19+00:00