diff --git a/_config.yml b/_config.yml
index 6275152702f..f06f05711b6 100644
--- a/_config.yml
+++ b/_config.yml
@@ -6,7 +6,7 @@
url: https://home-assistant.io
title: Home Assistant
subtitle: Open-source home automation platform running on Python 3
-author: Paulus Schoutsen
+author: Home Assistant
simple_search: https://www.google.com/search
description: Home Assistant is an open-source home automation platform running on Python 3.
diff --git a/source/_components/binary_sensor.http.markdown b/source/_components/binary_sensor.http.markdown
index dff711e5709..8e96f517918 100644
--- a/source/_components/binary_sensor.http.markdown
+++ b/source/_components/binary_sensor.http.markdown
@@ -32,6 +32,7 @@ For a quick test `curl` can be useful to "simulate" a device.
```bash
$ curl -X POST -H "x-ha-access: YOUR_PASSWORD" \
+ -H "Content-Type: application/json" \
-d '{"state": "off", "attributes": {"friendly_name": "Radio"}}' \
http://localhost:8123/api/states/binary_sensor.radio
```
diff --git a/source/_components/camera.local_file.markdown b/source/_components/camera.local_file.markdown
index 2cfff50676a..4fc2cb7cdcb 100644
--- a/source/_components/camera.local_file.markdown
+++ b/source/_components/camera.local_file.markdown
@@ -15,7 +15,7 @@ ha_release: 0.22
The `local_file` camera platform allows you to integrate any readable image file from disk into Home Assistant as a camera. If the image is updated on the file system the image displayed in Home Assistant will also be updated.
-This can for example be used with various camera platforms that save a temporary images locally. It can also be used to display a graph that you render periodacally and will then be displayed in Home Assistant.
+This can for example be used with various camera platforms that save a temporary images locally. It can also be used to display a graph that you render periodically and will then be displayed in Home Assistant.
To enable this camera in your installation, add the following to your `configuration.yaml` file:
diff --git a/source/_components/device_tracker.nmap_scanner.markdown b/source/_components/device_tracker.nmap_scanner.markdown
index 06bd0210a45..cd9019b38f8 100644
--- a/source/_components/device_tracker.nmap_scanner.markdown
+++ b/source/_components/device_tracker.nmap_scanner.markdown
@@ -29,7 +29,7 @@ device_tracker:
Configuration variables:
-- **hosts** (*Required*): Thenetwork range to scan in CIDR notation, eg. 192.168.1.1/24
+- **hosts** (*Required*): The network range to scan in CIDR notation, eg. 192.168.1.1/24
- **home_interval** (*Optional*): The number of minutes nmap will not scan this device, assuming it is home, in order to preserve the device battery.
See the [device tracker component page](/components/device_tracker/) for instructions how to configure the people to be tracked.
diff --git a/source/_components/hdmi_cec.markdown b/source/_components/hdmi_cec.markdown
index 905c67f85fa..d5267e82308 100644
--- a/source/_components/hdmi_cec.markdown
+++ b/source/_components/hdmi_cec.markdown
@@ -8,7 +8,7 @@ comments: false
sharing: true
footer: true
ha_category: Automation
-featured: false
+logo: hdmi.png
ha_release: 0.23
ha_iot_class: "Local Push"
---
@@ -23,11 +23,33 @@ The computer running Home Assistant must support CEC, and of course be connected
### {% linkable_title libcec %}
-[libcec](https://github.com/Pulse-Eight/libcec) must be installed for this component to work. Follow the installation instructions for your environment, provided at the link. `libcec` installs Python 3 bindings, by default as a system Python module. If you are running Home Assistant in a Python virtual environment, make sure it can access the system module, by either symlinking it or using the `--system-site-packages` flag.
+[libcec](https://github.com/Pulse-Eight/libcec) must be installed for this component to work. Follow the installation instructions for your environment, provided at the link. `libcec` installs Python 3 bindings by default as a system Python module. If you are running Home Assistant in a [Python virtual environment](/getting-started/installation-virtualenv/), make sure it can access the system module, by either symlinking it or using the `--system-site-packages` flag.
#### {% linkable_title Symlinking into virtual environment %}
-`ln -s /usr/local/lib/python3.4/dist-packages/cec
+It's HIGHLY recommended that you set the `api_password`, especially if you are planning to expose your installation to the internet.
+
+ If you do not download them you will lose them and will have to recreate a new user. +
+ +- Copy/Paste the two keys that you are provided here in your `configuration.yaml` file respectively. +- On the left hand side of the screen go back to "Users" and select the user you just created. On the "Permissions" tab click the "Attach Policy" icon. Search for "SNS" and attach the policy "AmazonSNSFUullAccess". +- Back to the AWS Console you now need to find "SNS" and click in to that service. It is under the Mobile Services group. +- On the left hand side, select "Topics" then "Create new topic". +- Choose a Topic Name and Display Name. +- Now check the box next to the Topic you just created and under Actions, select "Subscribe to topic". +- In the box that pops up, select the Protocol = SMS and enter in the phone number next to "Endpoint" you wish to SMS. Now click "Create". +- Repeat for additional numbers. +- Back in the "Users" section you will see a long alphanumeric line that starts with "arn:" and ends with the Topic Name you choose previously. This is what your "target" in Home Assistant will be. diff --git a/source/_components/sensor.speedtest.markdown b/source/_components/sensor.speedtest.markdown index 29b620cce14..95cd4a9e204 100644 --- a/source/_components/sensor.speedtest.markdown +++ b/source/_components/sensor.speedtest.markdown @@ -74,3 +74,5 @@ Configuration variables: - **day** (*Optional*): Specify the day(s) of the month to schedule the speedtest. Use a list for multiple entries. Default is None. This component uses [speedtest-cli](https://github.com/sivel/speedtest-cli) to gather network performance data from Speedtest.net. Please be aware of the potential [inconsistencies](https://github.com/sivel/speedtest-cli#inconsistency) that this component may display. + +When Home Assistant first starts up, the values of the speedtest will show as `Unknown`. You can use the service `sensor.update_speedtest` to run a manual speedtest and populate the data or just wait for the next regularly scheduled test. diff --git a/source/_cookbook/jupyther_notebooks_api.markdown b/source/_cookbook/jupyther_notebooks_api.markdown new file mode 100644 index 00000000000..4daaad35a5f --- /dev/null +++ b/source/_cookbook/jupyther_notebooks_api.markdown @@ -0,0 +1,13 @@ +--- +layout: page +title: "Notebook for Home Assistant Python API" +description: "Basic example how to work with the Home Assistant Python API in a Jupyter notebook." +date: 2016-07-23 09:00 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Jupyter Notebooks +ha_external_link: https://github.com/home-assistant/home-assistant-notebooks/blob/master/home-assistant-python-api.ipynb +--- + diff --git a/source/_cookbook/jupyther_notebooks_database.markdown b/source/_cookbook/jupyther_notebooks_database.markdown new file mode 100644 index 00000000000..22802cd0709 --- /dev/null +++ b/source/_cookbook/jupyther_notebooks_database.markdown @@ -0,0 +1,13 @@ +--- +layout: page +title: "Jupyter Notebooks Database" +description: "Basic example how to work with stored Home Assistant information in a Jupyter notebook." +date: 2016-07-23 09:00 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Jupyter Notebooks +ha_external_link: https://github.com/home-assistant/home-assistant-notebooks/blob/master/database-examples.ipynb +--- + diff --git a/source/_cookbook/jupyther_notebooks_graph.markdown b/source/_cookbook/jupyther_notebooks_graph.markdown new file mode 100644 index 00000000000..8e857c397e4 --- /dev/null +++ b/source/_cookbook/jupyther_notebooks_graph.markdown @@ -0,0 +1,13 @@ +--- +layout: page +title: "Jupyter Notebooks Graph" +description: "Basic example how to create a graph with a Jupyter notebook." +date: 2016-07-23 09:00 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Jupyter Notebooks +ha_external_link: https://github.com/home-assistant/home-assistant-notebooks/blob/master/graph-single-sensor.ipynb +--- + diff --git a/source/_cookbook/jupyther_notebooks_introduction.markdown b/source/_cookbook/jupyther_notebooks_introduction.markdown new file mode 100644 index 00000000000..2a3d714aa92 --- /dev/null +++ b/source/_cookbook/jupyther_notebooks_introduction.markdown @@ -0,0 +1,55 @@ +--- +layout: page +title: "Jupyter Notebooks Introduction" +description: "Setup and first steps for Jupyter Notebooks and Home Assistant." +date: 2016-07-23 09:00 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Jupyter Notebooks +--- + +The [Jupyter Notebooks](http://jupyter.org/) allows you to create and share documents that contain live code, equations, visualizations, and explanatory text directly in your browser. The web application what is formerly known as the IPython Notebook supports over 40 programming languages. + +Visit [https://try.jupyter.org/](https://try.jupyter.org/) to get a preview before you install it locally. + +The very first step is to install the requirement to run Jupyter Notebooks. + +```bash +$ pip3 install jupyter matplotlib +``` + ++Certain notebooks hosted in the [Home Assistant notebooks repository](https://github.com/home-assistant/home-assistant-notebooks) require access to a running Home Assistant instance or parts of a Home Assistant installation. If you want to run those notebooks install Home Assistant with `$ pip3 install homeassistant` as well. +
+ +Now you are able to start the application. + +```bash +$ jupyter notebook +[I 17:22:18.081 NotebookApp] Writing notebook server cookie secret to /run/user/1000/jupyter/notebook_cookie_secret +[I 17:22:18.921 NotebookApp] Serving notebooks from local directory: /home/fabaff/home-assistant +[I 17:22:18.921 NotebookApp] 0 active kernels +[I 17:22:18.921 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/ +[I 17:22:18.922 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). +``` + +Open [http://localhost:8888/](http://localhost:8888/) in your browser. Press "New" -> "Python3" to open a new notebook. + +
+
+
+
+
+
+One of the graphs created with this tutorial.
+
+
+One of the graphs created with this tutorial.
+
+The public build of the firmware may be different than the firmware distributed to the backers of the campaign. Especially in regard of the [available modules](http://docs.micropython.org/en/latest/esp8266/py-modindex.html), turned on debug messages, and alike. Also, the WebREPL may not be started by default. +
+ +Connect a LED to pin 5 (or another pin of your choosing) to check if the ESP8266 is working as expected. + +```python +>>> import machine +>>> pin = machine.Pin(5, machine.Pin.OUT) +>>> pin.high() +``` + +You can toogle the LED by changing its state with `pin.high()` and `pin.low()`. + +Various ESP8266 development board are shipped with an onboard photocell or a light dependent resistors (LDR) connected to the analog pin of your ESP8266 check if you are able to obtain a value. + +```python +>>> import machine +>>> brightness = machine.ADC(0) +>>> brightness.read() +``` + +Make sure that you are familiar with REPL and WebREPL because this will be needed soon. Keep in mind the password for the WebREPL access. + +Read the [instructions](http://docs.micropython.org/en/latest/esp8266/esp8266/tutorial/network_basics.html) about how to setup your wireless connection. Basically you need to upload a `boot.py` file to the microcontroller and this file is taking care of the connection setup. Below you find a sample which is more or less the same as shown in the [documentation](http://docs.micropython.org/en/latest/esp8266/esp8266/tutorial/network_basics.html#configuration-of-the-wifi). + +```python +def do_connect(): + import network + + SSID = 'SSID' + PASSWORD = 'PASSWORD' + + sta_if = network.WLAN(network.STA_IF) + ap_if = network.WLAN(network.AP_IF) + if ap_if.active(): + ap_if.active(False) + if not sta_if.isconnected(): + print('connecting to network...') + sta_if.active(True) + sta_if.connect(SSID, PASSWORD) + while not sta_if.isconnected(): + pass + print('Network configuration:', sta_if.ifconfig()) +``` + +Upload this file with `webrepl_cli.py` or the WebREPL: + +```bash +$ python webrepl_cli.py boot.py 192.168.4.1:/boot.py +``` + +If you reboot, you should see your current IP address in the terminal. + +```bash +>>> Network configuration: ('192.168.0.10', '255.255.255.0', '192.168.0.1', '192.168.0.1') +``` + +First let's create a little consumer for Home Assistant sensor's state. The code to place in `main.py` is a mixture of code from above and the [RESTful API](/developers/rest_api/) of Home Assistant. If the temperature in the kitchen is higher than 20 °C then the LED connected to pin 5 is switched on. + ++If a module is missing then you need to download is it from [MicroPython Library overview](https://github.com/micropython/micropython-lib) and upload it to the ESP8266 with `webrepl_cli.py` manually. +
+ +```python +# Sample code to request the state of a Home Assistant entity. + +API_PASSWORD = 'YOUR_PASSWORD' +URL = 'http://192.168.0.5:8123/api/states/' +ENTITY = 'sensor.kitchen_temperature' +TIMEOUT = 30 +PIN = 5 + +def get_data(): + import urequests + url = '{}{}'.format(URL, ENTITY) + headers = {'x-ha-access': API_PASSWORD, + 'content-type': 'application/json'} + resp = urequests.get(URL, headers=headers) + return resp.json()['state'] + +def main(): + import machine + import time + + pin = machine.Pin(PIN, machine.Pin.OUT) + while True: + try: + if int(get_data()) >= 20: + pin.high() + else: + pin.low() + except TypeError: + pass + time.sleep(TIMEOUT) + +if __name__ == '__main__': + print('Get the state of {}'.format(ENTITY)) + main() +``` + +Upload `main.py` the same way as `boot.py`. After a reboot (`>>> import machine` and `>>> machine.reboot()`) or power-cycling your physical notifier is ready. + +If you run into trouble, press "Ctrl+c" in the REPL to stop the execution of the code, enter `>>> import webrepl` and `>>> webrepl.start()`, and upload your fixed file. + diff --git a/source/_topics/splitting_configuration.markdown b/source/_topics/splitting_configuration.markdown index 91cb7b823bc..40d3ccd5b93 100644 --- a/source/_topics/splitting_configuration.markdown +++ b/source/_topics/splitting_configuration.markdown @@ -179,7 +179,7 @@ That about wraps it up. If you have issues checkout `home-assistant.log` in the configuration directory as well as your indentations. If all else fails, head over to the [Gitter Chatroom](https://gitter.im/balloob/home-assistant) and ask away. -### {% linkable_title Advanced usage %} +### {% linkable_title Advanced Usage %} We offer four advanced options to include whole directories at once. @@ -190,3 +190,258 @@ We offer four advanced options to include whole directories at once. `!include_dir_merge_list` will return content of a directory as a list by merging all files (which should contain a list) into 1 big list. `!include_dir_merge_named` will return content of a directory as a dictionary by loading each file and merging it into 1 big dictionary. + +#### {% linkable_title Example: `!include_dir_list` %} + +`configuration.yaml` + +```yaml +automation: + - alias: Automation 1 + trigger: + platform: state + entity_id: device_tracker.iphone + to: 'home' + action: + service: light.turn_on + entity_id: light.entryway + - alias: Automation 2 + trigger: + platform: state + entity_id: device_tracker.iphone + from: 'home' + action: + service: light.turn_off + entity_id: light.entryway +``` + +can be turned into: + +`configuration.yaml` + +```yaml +automation: !include_dir_list automation/presence/ +``` + +`automation/presence/automation1.yaml` + +```yaml +alias: Automation 1 +trigger: + platform: state + entity_id: device_tracker.iphone + to: 'home' +action: + service: light.turn_on + entity_id: light.entryway +``` + +`automation/presence/automation2.yaml` + +```yaml +alias: Automation 2 +trigger: + platform: state + entity_id: device_tracker.iphone + from: 'home' +action: + service: light.turn_off + entity_id: light.entryway +``` + +It is important to note that each file must contain only **one** entry when using `!include_dir_list`. + +#### {% linkable_title Example: `!include_dir_named` %} + +`configuration.yaml` + +```yaml +{% raw %} +alexa: + intents: + LocateIntent: + action: + service: notify.pushover + data: + message: Your location has been queried via Alexa. + speech: + type: plaintext + text: > + {%- for state in states.device_tracker -%} + {%- if state.name.lower() == User.lower() -%} + {{ state.name }} is at {{ state.state }} + {%- endif -%} + {%- else -%} + I am sorry. Pootie! I do not know where {{User}} is. + {%- endfor -%} + WhereAreWeIntent: + speech: + type: plaintext + text: > + {%- if is_state('device_tracker.iphone', 'home') -%} + iPhone is home. + {%- else -%} + iPhone is not home. + {% endif %}{% endraw %} +``` + +can be turned into: + +`configuration.yaml` + +```yaml +alexa: + intents: !include_dir_named alexa/ +``` + +`alexa/LocateIntent.yaml` + +```yaml +{% raw %} +action: + service: notify.pushover + data: + message: Your location has been queried via Alexa. +speech: + type: plaintext + text: > + {%- for state in states.device_tracker -%} + {%- if state.name.lower() == User.lower() -%} + {{ state.name }} is at {{ state.state }} + {%- endif -%} + {%- else -%} + I am sorry. Pootie! I do not know where {{User}} is. + {%- endfor -%}{% endraw %} +``` + +`alexa/WhereAreWeIntent.yaml` + +```yaml +{% raw %} +speech: + type: plaintext + text: > + {%- if is_state('device_tracker.iphone', 'home') -%} + iPhone is home. + {%- else -%} + iPhone is not home. + {% endif %}{% endraw %} +``` + +#### {% linkable_title Example: `!include_dir_merge_list` %} + +`configuration.yaml` + +```yaml +automation: + - alias: Automation 1 + trigger: + platform: state + entity_id: device_tracker.iphone + to: 'home' + action: + service: light.turn_on + entity_id: light.entryway + - alias: Automation 2 + trigger: + platform: state + entity_id: device_tracker.iphone + from: 'home' + action: + service: light.turn_off + entity_id: light.entryway +``` + +can be turned into: + +`configuration.yaml` + +```yaml +automation: !include_dir_merge_list automation/ +``` + +`automation/presence.yaml` + +```yaml +- alias: Automation 1 + trigger: + platform: state + entity_id: device_tracker.iphone + to: 'home' + action: + service: light.turn_on + entity_id: light.entryway + +- alias: Automation 2 + trigger: + platform: state + entity_id: device_tracker.iphone + from: 'home' + action: + service: light.turn_off + entity_id: light.entryway +``` + +It is important to note that when using `!include_dir_merge_list`, you must include a list in each file (each list item is denoted with a hyphen [-]). Each file may contain one or more entries. + +#### {% linkable_title Example: `!include_dir_merge_named` %} + +`configuration.yaml` + +```yaml +group: + bedroom: + name: Bedroom + entities: + - light.bedroom_lamp + - light.bedroom_overhead + hallway: + name: Hallway + entities: + - light.hallway + - thermostat.home + front_yard: + name: Front Yard + entities: + - light.front_porch + - light.security + - light.pathway + - sensor.mailbox + - camera.front_porch +``` + +can be turned into: + +`configuration.yaml` + +```yaml +group: !include_dir_merge_named group/ +``` + +`group/interior.yaml` + +```yaml +bedroom: + name: Bedroom + entities: + - light.bedroom_lamp + - light.bedroom_overhead +hallway: + name: Hallway + entities: + - light.hallway + - thermostat.home +``` + +`group/exterior.yaml` + +```yaml +front_yard: + name: Front Yard + entities: + - light.front_porch + - light.security + - light.pathway + - sensor.mailbox + - camera.front_porch +``` diff --git a/source/developers/platform_example_light.markdown b/source/developers/platform_example_light.markdown index c50e2ca6e4a..759e9a379c2 100644 --- a/source/developers/platform_example_light.markdown +++ b/source/developers/platform_example_light.markdown @@ -39,7 +39,7 @@ _LOGGER = logging.getLogger(__name__) def setup_platform(hass, config, add_devices, discovery_info=None): - """Initialize Awesome Light platform.""" + """Setup the Awesome Light platform.""" import awesomelights # Validate passed in config @@ -63,8 +63,9 @@ def setup_platform(hass, config, add_devices, discovery_info=None): # Add devices add_devices(AwesomeLight(light) for light in hub.lights()) + class AwesomeLight(Light): - """Represents an AwesomeLight in Home Assistant.""" + """Representation of an Awesome Light.""" def __init__(self, light): """Initialize an AwesomeLight.""" @@ -72,7 +73,7 @@ class AwesomeLight(Light): @property def name(self): - """Return the display name of this light""" + """Return the display name of this light.""" return self._light.name @property @@ -86,7 +87,7 @@ class AwesomeLight(Light): @property def is_on(self): - """If light is on.""" + """Return true if light is on.""" return self._light.is_on() def turn_on(self, **kwargs): @@ -105,7 +106,7 @@ class AwesomeLight(Light): def update(self): """Fetch new state data for this light. - This is the only method that should fetch new data for Home Assitant. + This is the only method that should fetch new data for Home Assistant. """ self._light.update() ``` diff --git a/source/developers/platform_example_sensor.markdown b/source/developers/platform_example_sensor.markdown index 124475f9661..8902faead2d 100644 --- a/source/developers/platform_example_sensor.markdown +++ b/source/developers/platform_example_sensor.markdown @@ -31,19 +31,25 @@ from homeassistant.helpers.entity import Entity def setup_platform(hass, config, add_devices, discovery_info=None): + """Setup the sensor platform.""" add_devices([ExampleSensor()]) class ExampleSensor(Entity): + """Representation of a Sensor.""" + @property def name(self): + """Return the name of the sensor.""" return 'Example Temperature' @property def state(self): + """Return the state of the sensor."" return 23 @property def unit_of_measurement(self): + """Return the unit of measurement.""" return TEMP_CELSIUS ``` diff --git a/source/developers/python_api.markdown b/source/developers/python_api.markdown index 1e0e5a1f600..fba1fa78ad9 100644 --- a/source/developers/python_api.markdown +++ b/source/developers/python_api.markdown @@ -52,19 +52,19 @@ Similar to the output in the "Developer Tools" of the frontend. ```python import homeassistant.remote as remote -api = remote.API('127.1.0.1', 'password') +api = remote.API('127.1.0.1', 'YOUR_PASSWORD') print('-- Available services:') services = remote.get_services(api) for service in services: print(service['services']) -print('\n-- Available event') +print('\n-- Available events:') events = remote.get_event_listeners(api) for event in events: print(event) -print('\n-- Available entities') +print('\n-- Available entities:') entities = remote.get_states(api) for entity in entities: print(entity) @@ -77,7 +77,7 @@ To get the details of a single entity the `get_state` method is used. ```python import homeassistant.remote as remote -api = remote.API('127.1.0.1', 'password') +api = remote.API('127.1.0.1', 'YOUR_PASSWORD') office_temperature = remote.get_state(api, 'sensor.office_temperature') print('{} is {} {}.'.format(office_temperature.attributes['friendly_name'], office_temperature.state, @@ -97,7 +97,7 @@ The exact same thing is working for a switch. The difference is that both entiti ```python import homeassistant.remote as remote -api = remote.API('127.1.0.1', 'password') +api = remote.API('127.1.0.1', 'YOUR_PASSWORD') switch_livingroom = remote.get_state(api, 'switch.livingroom_pin_2') print('{} is {}.'.format(switch_livingroom.attributes['friendly_name'], switch_livingroom.state @@ -113,7 +113,7 @@ Of course, it's possible to set the state. import homeassistant.remote as remote from homeassistant.const import STATE_ON -api = remote.API('127.1.0.1', 'password') +api = remote.API('127.1.0.1', 'YOUR_PASSWORD') remote.set_state(api, 'sensor.office_temperature', new_state=123) remote.set_state(api, 'switch.livingroom_pin_2', new_state=STATE_ON) ``` @@ -122,14 +122,14 @@ The state will be set to those value until the next update occurs. ### {% linkable_title Blinking all entites of a domain %} -If you want to turn on all entities of a domain, just a service which was retrieved by `get_services`. +If you want to turn on all entities of a domain, just use a service which was retrieved by `get_services`. ```python import time import homeassistant.remote as remote -api = remote.API('127.1.0.1', 'password') +api = remote.API('127.1.0.1', 'YOUR_PASSWORD') domain = 'switch' remote.call_service(api, domain, 'turn_on') @@ -145,7 +145,7 @@ To turn on or off a single switch. The ID of the entity is needed as attribute. import time import homeassistant.remote as remote -api = remote.API('127.1.0.1', 'password') +api = remote.API('127.1.0.1', 'YOUR_PASSWORD') domain = 'switch' switch_name = 'switch.livingroom_pin_2' @@ -185,7 +185,7 @@ The example uses the jabber notification platform to send a single message to th ```python import homeassistant.remote as remote -api = remote.API('127.1.0.1', 'password') +api = remote.API('127.1.0.1', 'YOUR_PASSWORD') domain = 'notify' data = {"title":"Test", "message":"A simple test message from HA."} diff --git a/source/developers/rest_api.markdown b/source/developers/rest_api.markdown index 4f4020fa032..f8fd4f5429b 100644 --- a/source/developers/rest_api.markdown +++ b/source/developers/rest_api.markdown @@ -39,7 +39,7 @@ print(response.text) ```
-You can append ?api_password=YOUR_PASSWORD
to any url to log in automatically.
+You can append `?password=YOUR_PASSWORD` to any url to log in automatically.