From ec5306e5794a3bcee697013f2089af96396632bd Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 2 Oct 2016 17:14:48 +0200 Subject: [PATCH] Minimizing of the configuration sample (#1041) --- .../device_sun_light_trigger.markdown | 14 ++++++++--- source/_components/http.markdown | 25 ++++++++++++------- source/_components/keyboard_remote.markdown | 16 ++++++------ source/_components/updater.markdown | 9 ++++++- source/_components/upnp.markdown | 3 +-- source/_components/zeroconf.markdown | 2 ++ 6 files changed, 46 insertions(+), 23 deletions(-) diff --git a/source/_components/device_sun_light_trigger.markdown b/source/_components/device_sun_light_trigger.markdown index dd2b298b2e1..e0a75a093c4 100644 --- a/source/_components/device_sun_light_trigger.markdown +++ b/source/_components/device_sun_light_trigger.markdown @@ -24,10 +24,6 @@ To enable this component, add the following lines to your `configuration.yaml` f ```yaml # Example configuration.yaml entry device_sun_light_trigger: - light_group: group.living_room - light_profile: relax - device_group: group.my_devices - disable_turn_off: 1 ``` Configuration variables: @@ -37,3 +33,13 @@ Configuration variables: - **device_group** (*Optional*): Specify which group of devices to track. - **disable_turn_off** (*Optional*): Disable lights being turned off when everybody leaves the house. +A full configuration example could look like this: + +```yaml +# Example configuration.yaml entry +device_sun_light_trigger: + light_group: group.living_room + light_profile: relax + device_group: group.my_devices + disable_turn_off: 1 +``` diff --git a/source/_components/http.markdown b/source/_components/http.markdown index 48046d17481..8f7f7308ec7 100644 --- a/source/_components/http.markdown +++ b/source/_components/http.markdown @@ -21,15 +21,6 @@ It's HIGHLY recommended that you set the `api_password`, especially if you are p # Example configuration.yaml entry http: api_password: YOUR_PASSWORD - server_port: 12345 - ssl_certificate: /etc/letsencrypt/live/hass.example.com/fullchain.pem - ssl_key: /etc/letsencrypt/live/hass.example.com/privkey.pem - cors_allowed_origins: - - https://google.com - - https://home-assistant.io - approved_ips: - - 127.0.0.1 - - 192.168.1.9 ``` Configuration variables: @@ -43,6 +34,22 @@ Configuration variables: - **cors_allowed_origins** (*Optional*): A list of origin domain names to allow [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) requests from. Enabling this will set the `Access-Control-Allow-Origin` header to the Origin header if it is found in the list, and the `Access-Control-Allow-Headers` header to `Origin, Accept, X-Requested-With, Content-type, X-HA-access`. You must provide the exact Origin, i.e. `https://home-assistant.io` will allow requests from `https://home-assistant.io` but __not__ `http://home-assistant.io`. - **approved_ips** (*Optional*): A list of approved ips. Then it will be possible to login from given ips without providing a password. +The sample below shows a configuration entry with possible values: + +```yaml +# Example configuration.yaml entry +http: + api_password: YOUR_PASSWORD + server_port: 12345 + ssl_certificate: /etc/letsencrypt/live/hass.example.com/fullchain.pem + ssl_key: /etc/letsencrypt/live/hass.example.com/privkey.pem + cors_allowed_origins: + - https://google.com + - https://home-assistant.io + approved_ips: + - 127.0.0.1 + - 192.168.1.9 +``` The [Set up encryption using Let's Encrypt](/blog/2015/12/13/setup-encryption-using-lets-encrypt/) blog post gives you details about the encryption of your traffic using free certificates from [Let's Encrypt](https://letsencrypt.org/). diff --git a/source/_components/keyboard_remote.markdown b/source/_components/keyboard_remote.markdown index e386568cc27..8c61ba9a736 100644 --- a/source/_components/keyboard_remote.markdown +++ b/source/_components/keyboard_remote.markdown @@ -15,12 +15,10 @@ ha_iot_class: "Local Push" Recieve signals from a keyboard and use it as a remote control. -This component allows to use a keyboard as remote control. It will -fire ´keyboard_remote_command_received´ events witch can then be used -in automation rules. +This component allows to use a keyboard as remote control. It will fire `keyboard_remote_command_received` events witch can then be used +in automation rules. -The `evdev` package is used to interface with the keyboard and thus this -is Linux only. It also means you can't use your normal keyboard for this, +The `evdev` package is used to interface with the keyboard and thus this is Linux only. It also means you can't use your normal keyboard for this, because `evdev` will block it. @@ -28,10 +26,14 @@ because `evdev` will block it. # Example configuration.yaml entry keyboard_remote: device_descriptor: '/dev/input/by-id/foo' - key_value: 'key_up' # optional alternaive 'key_down' and 'key_hold' - # be carefull, 'key_hold' fires a lot of events + key_value: 'key_up' ``` +Configuration variables: + +- **device_descriptor** (*Required*): List of URLS for your feeds. +- **key_value** (*Required*): Possible values are `key_up`, `key_down`, and `key_hold`. Be careful, `key_hold` will fire a lot of events. + And an automation rule to bring breath live into it. ```yaml diff --git a/source/_components/updater.markdown b/source/_components/updater.markdown index 980653e0cd9..9d9edc19ef7 100644 --- a/source/_components/updater.markdown +++ b/source/_components/updater.markdown @@ -11,7 +11,14 @@ logo: home-assistant.png ha_category: Other --- -The updater component will check for new releases at startup and everyday at noon and midnight. It will show a badge in the frontend if a new version has been detected. +The `updater` component will check for new releases at startup and everyday at noon and midnight. It will show a badge in the frontend if a new version has been detected. + +To integrate this into Home Assistant, add the following section to your `configuration.yaml` file: + +```yaml +# Example configuration.yaml entry +updater: +``` For an added bonus, an automation component can be created to send a message with a notifier when that state of this component's entity changes. diff --git a/source/_components/upnp.markdown b/source/_components/upnp.markdown index 64061eb08a2..82d55b91d65 100644 --- a/source/_components/upnp.markdown +++ b/source/_components/upnp.markdown @@ -13,7 +13,6 @@ ha_release: 0.18 The `upnp` component automatically creates port forwarding mappings on your router for Home Assistant. UPnP or NAT-PMP needs to be enabled on your router for this component to work. -# Installation You need to install [miniupnpc](https://github.com/miniupnp/miniupnp/tree/master/miniupnpc) before using the UPnP component: ```bash @@ -24,7 +23,7 @@ $ make pythonmodule3 $ sudo make installpythonmodule3 ``` -# Configuration +To integrate this into Home Assistant, add the following section to your `configuration.yaml` file: ```yaml # Example configuration.yaml entry diff --git a/source/_components/zeroconf.markdown b/source/_components/zeroconf.markdown index 0dcf8196519..890af110d26 100644 --- a/source/_components/zeroconf.markdown +++ b/source/_components/zeroconf.markdown @@ -13,6 +13,8 @@ ha_release: 0.18 The `zeroconf` component exposes your Home Assistant to the local network using [Zeroconf](https://en.wikipedia.org/wiki/Zero-configuration_networking). Zeroconf is also sometimes known as Bonjour, Rendezvous and Avahi. +To integrate this into Home Assistant, add the following section to your `configuration.yaml` file: + ```yaml # Example configuration.yaml entry zeroconf: