diff --git a/_config.yml b/_config.yml index 594037c04d4..6275152702f 100644 --- a/_config.yml +++ b/_config.yml @@ -79,6 +79,8 @@ collections: output: true cookbook: output: true + topics: + output: true # ----------------------- # # 3rd Party Settings # diff --git a/source/_components/alexa.markdown b/source/_components/alexa.markdown index 9922762b632..0cfeb9a1153 100644 --- a/source/_components/alexa.markdown +++ b/source/_components/alexa.markdown @@ -80,7 +80,7 @@ Out of the box, the component will do nothing. You have to teach it about all in You can use [templates] for the values of `speech/text`, `card/title` and `card/content`. -[templates]: /getting-started/templating/ +[templates]: /topics/templating/ Configuring the Alexa component for the above intents would look like this: diff --git a/source/_components/automation.markdown b/source/_components/automation.markdown index 1153e146c0e..6d592a7307c 100644 --- a/source/_components/automation.markdown +++ b/source/_components/automation.markdown @@ -209,7 +209,7 @@ automation: Conditions are an optional part of an automation rule and be used to prevent an action from happening when triggered. Conditions look very familiar to triggers but are very different. A trigger will look at events happening at the system while a condition only looks at how the system looks right now. A trigger can observe that a switch is being turned on. A condition can only see if a switch is on or off. -An automation rule can have mulitiple triggers. By default the action will only fire if all conditions pass. An optional key `condition_type: 'or'` can be set on the automation rule to fire action if any condition matches. In the example below, the automation would trigger if the time is before 05:00 _OR_ after 20:00. +An automation rule can have mulitiple conditions. By default the action will only fire if all conditions pass. An optional key `condition_type: 'or'` can be set on the automation rule to fire action if any condition matches. In the example below, the automation would trigger if the time is before 05:00 _OR_ after 20:00. ```yaml automation: @@ -363,4 +363,4 @@ The Logbook component will show a line entry when an automation is triggered. Y ![Logbook example](/images/components/automation/logbook.png) -[template]: /getting-started/templating/ +[template]: /topics/templating/ diff --git a/source/_components/binary_sensor.command_line.markdown b/source/_components/binary_sensor.command_line.markdown index c34be637491..f00c788d28b 100644 --- a/source/_components/binary_sensor.command_line.markdown +++ b/source/_components/binary_sensor.command_line.markdown @@ -33,7 +33,7 @@ Configuration variables: - **name** (*Optional*): Let you overwrite the the name of the device. By default *name* from the device is used. - **payload_on** (*Optional*): The payload that represents enabled state. Default is "ON". - **payload_off** (*Optional*): The payload that represents disabled state. Default is "OFF". -- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload. +- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload. ## {% linkable_title Examples %} diff --git a/source/_components/binary_sensor.mqtt.markdown b/source/_components/binary_sensor.mqtt.markdown index 43a3ab06a58..ddb23f9df2e 100644 --- a/source/_components/binary_sensor.mqtt.markdown +++ b/source/_components/binary_sensor.mqtt.markdown @@ -25,6 +25,7 @@ binary_sensor: qos: 0 payload_on: "ON" payload_off: "OFF" + sensor_class: opening value_template: '{% raw %}{{ value.x }}{% endraw %}' ``` @@ -35,7 +36,8 @@ Configuration variables: - **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0. - **payload_on** (*Optional*): The payload that represents on state. Default is "ON". - **payload_off** (*Optional*): The payload that represents state. Default is "OFF". -- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload. +- **sensor_class** (*Optional*): The [type/class](/components/binary_sensor/) of the sensor to set the icon in the frontend. +- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload. For a quick check you can use the commandline tools shipped with `mosquitto` to send MQTT messages. Set the state of your sensor manually: diff --git a/source/_components/binary_sensor.rest.markdown b/source/_components/binary_sensor.rest.markdown index c9075bbf8cb..e1fac78ddce 100644 --- a/source/_components/binary_sensor.rest.markdown +++ b/source/_components/binary_sensor.rest.markdown @@ -42,7 +42,7 @@ Configuration variables: - **resource** (*Required*): The resource or endpoint that contains the value. - **method** (*Optional*): The method of the request. Default is GET. -- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract the value. +- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract the value. - **payload** (*Optional*): The payload to send with a POST request. Usualy formed as a dictionary. - **name** (*Optional*): Name of the REST binary sensor. diff --git a/source/_components/binary_sensor.tcp.markdown b/source/_components/binary_sensor.tcp.markdown index d7551c044ac..e328ffb034f 100644 --- a/source/_components/binary_sensor.tcp.markdown +++ b/source/_components/binary_sensor.tcp.markdown @@ -37,7 +37,7 @@ Configuration options for the a TCP Sensor: - **payload** (*Required*): What to send to the host in order to get the response we're interested in. - **value_on** (*Required*): The value returned when the device is "on". - **timeout** (*Optional*): How long in seconds to wait for a response from the service before giving up and disconnecting. Defaults to 10. -- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract the value. By default it's assumed that the entire response is the value. +- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract the value. By default it's assumed that the entire response is the value. - **unit** (*Optional*): The unit of measurement to use for the value. - **buffer_size** (*Optional*): The size of the receive buffer in bytes. Set this to a larger value if you expect to receive a response larger than the default. Defaults to 1024. diff --git a/source/_components/binary_sensor.template.markdown b/source/_components/binary_sensor.template.markdown index 15477408f00..f325ba4de4d 100644 --- a/source/_components/binary_sensor.template.markdown +++ b/source/_components/binary_sensor.template.markdown @@ -29,7 +29,7 @@ Configuration variables: - **sensors** array (*Required*): List of your sensors. - **friendly_name** (*Optional*): Name to use in the Frontend. - **sensor_class** (*Optional*): Defines the class of the sensor (motion, heat, moisture, etc) - - **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload. + - **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload. ## {% linkable_title Examples %} diff --git a/source/_components/browser.markdown b/source/_components/browser.markdown index 9c5d2385a82..36bb6176789 100644 --- a/source/_components/browser.markdown +++ b/source/_components/browser.markdown @@ -12,7 +12,7 @@ ha_category: Other --- -The browser component provides a service to open urls in the default browser on the host machine. +The `browser` component provides a service to open URLs in the default browser on the host machine. To load this component, add the following lines to your `configuration.yaml`: @@ -21,8 +21,19 @@ To load this component, add the following lines to your `configuration.yaml`: browser: ``` -#### Service `browser/browse_url` +#### {% linkable_title Service `browser/browse_url` %} | Service data attribute | Optional | Description | | ---------------------- | -------- | ----------- | | `url` | no | The url to open + + +### {% linkable_title Usage %} + +To use this service, choose **Call Service** from the **Developer Tools**. Choose the service *browser/browse_url* from the list of **Available services:** and enter the URL into the **Service Data** field and hit **CALL SERVICE**. + +```json +{"url": "http://www.google.com"} +``` + +This will open the given URL on the host machine. diff --git a/source/_components/camera.foscam.markdown b/source/_components/camera.foscam.markdown index 906fb622a1b..40e8924069b 100644 --- a/source/_components/camera.foscam.markdown +++ b/source/_components/camera.foscam.markdown @@ -20,7 +20,7 @@ To enable your Foscam IP camera in your installation, add the following to your # Example configuration.yaml entry camera: platform: foscam - ip: 192.168.0.123 + ip: IP_ADDRESS name: Door Camera port: 88 username: USERNAME @@ -29,12 +29,15 @@ camera: Configuration variables: -- **ip** *Required*: The IP address your camera. -- **port** *Optional*: The port that the camera is running on. The default is 88. -- **name** *Optional*: This parameter allows you to override the name of your camera. -- **username** *Required*: The username for accessing your camera. -- **password** *Required*: The password for accessing your camera. - - **Note**: There seems to be some issues within Foscam with lengthy passwords and passwords containing certain symbols. Be sure to check your camera's documentation. +- **ip** (*Required*): The IP address your camera. +- **port** (*Optional*): The port that the camera is running on. The default is 88. +- **name** (*Optional*): This parameter allows you to override the name of your camera. +- **username** (*Required*): The username for accessing your camera. +- **password** (*Required*): The password for accessing your camera. + +

+There seems to be some issues within Foscam with lengthy passwords and passwords containing certain symbols. Be sure to check your camera's documentation. +

### {% linkable_title Control Foscam PTZ (Pan/Tilt/Zoom) - Home/Away %} Foscam Webcams which support CGI Commands can be controlled by Home Assistant ([Source](http://www.ipcamcontrol.net/files/Foscam%20IPCamera%20CGI%20User%20Guide-V1.0.4.pdf)). For an example of how this can be done, see the [Foscam IP Camera Pan, Tilt, Zoom Control](/cookbook/foscam_away_mode_PTZ/) Cookbook entry. diff --git a/source/_components/device_tracker.nmap_scanner.markdown b/source/_components/device_tracker.nmap_scanner.markdown index e2fad493eaa..de2989900e2 100644 --- a/source/_components/device_tracker.nmap_scanner.markdown +++ b/source/_components/device_tracker.nmap_scanner.markdown @@ -27,6 +27,9 @@ device_tracker: home_interval: 10 ``` -`home_interval` is an optional value set in minutes. This will be the number of minutes nmap will not scan this device, assuming it is home, in order to preserve the device battery. +Configuration variables: + +- **hosts** (*Required*): Thenetwork 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/device_tracker.snmp.markdown b/source/_components/device_tracker.snmp.markdown index b61e1f8fad8..9f23170c6e1 100644 --- a/source/_components/device_tracker.snmp.markdown +++ b/source/_components/device_tracker.snmp.markdown @@ -23,6 +23,8 @@ OID examples: - Mikrotik: 1.3.6.1.2.1.4.22.1.2 (confirmed, RouterOS 6.x on RB2011) - Aruba: 1.3.6.1.4.1.14823.2.3.3.1.2.4.1.2 (untested) - BiPAC 7800DXL: 1.3.6.1.2.1.17.7.1.2.2.1.1 (confirmed on firmware 2.32e) +- OpenWrt: 1.3.6.1.2.1.4.22.1.2 (tested on Chaos Calmer 15.05 firmware, need to install snmpd package) +- pfSense: 1.3.6.1.2.1.4.22.1.2 (tested on 2.2.4-RELEASE, need to enable SNMP service) To use the snmp platform in your installation, add the following to your `configuration.yaml` file: diff --git a/source/_components/discovery.markdown b/source/_components/discovery.markdown index 8633fba2c2e..a15d2944401 100644 --- a/source/_components/discovery.markdown +++ b/source/_components/discovery.markdown @@ -37,5 +37,9 @@ If running home-assistant in a docker container use switch `--net=host` to put i If you are developing a new platform, please read [how to make your platform discoverable]({{site_root}}/developers/add_new_platform/#discovery).

-There is currently a known issue with running this playform on a 64-bit version of Python. +There is currently a known issue with running this platform on a 64-bit version of Python. +

+ +

+If you are on Windows and you're using Python 3.5, download the Netifaces dependency here.

diff --git a/source/_components/group.markdown b/source/_components/group.markdown index 902596f3471..3eb481b314f 100644 --- a/source/_components/group.markdown +++ b/source/_components/group.markdown @@ -15,10 +15,11 @@ Groups allow the user to combine multiple entities into one. A group can be prom Check the **Set State** page from the **Developer Tools** and browse the **Current entities:** listing for all available entities. +By default, every group appears in the HOME tab. If you name a group `default_view` it will REPLACE the contents of the HOME tab so you can customize it as you wish. + ```yaml # Example configuration.yaml entry group: - # If you name an entry default_view it will REPLACE the contents of the "Home" tab default_view: view: yes entities: @@ -42,24 +43,32 @@ group: Configuration variables: +- **view** (*Optional*): If yes then the entry will be shown as a view (tab). - **name** (*Optional*): Name of the group. -- **icon** (*Optional*): An optional icon to show in the Frontend. -- **view** (*Optional*): If yes then the entry will be shown as a view. -- **entities** array or comma delimited string (*Required*): List of entites to group. +- **icon** (*Optional*): If the group is a view, this icon will show at the top in the frontend instead of the name. If it's not a view, then the icon shows when this group is used in another group. +- **entities** (*Required*): array or comma delimited string, list of entities to group.

Example of groups shown as views in the frontend.

-If all entities are switches or lights they can be controlled as one with a switch at the top of the card. Grouped states should share the same type of states (ON/OFF or HOME/NOT_HOME). +If all entities in a group are switches or lights then Home Assistant adds a switch at the top of the card that turns them all on/off at once. + +You can create views (tabs) that contain other groups. +Notice in the example below that in order to refer to the group "Living Room", you use `group.living_room` (lowercase and spaces replaced with underscores). ```yaml -# Example configuration.yaml entry -group: - living_room: - - light.bowl - - light.ceiling - - light.tv_back_light - children: device_tracker.child_1, device_tracker.child_2 -``` +# Example configuration.yaml entry that shows two groups, referred to in a view group (tab) + Living Room: + entities: + - light.light_family_1 + - binary_sensor.motion_living + Bedroom: light.light_bedroom, switch.sleeping + Rooms: + view: yes + name: Rooms + entities: + - group.living_room + - group.bedroom +``` \ No newline at end of file diff --git a/source/_components/light.hue.markdown b/source/_components/light.hue.markdown index a4eb453ea92..1236a070420 100644 --- a/source/_components/light.hue.markdown +++ b/source/_components/light.hue.markdown @@ -22,6 +22,13 @@ If you want to enable the light component directly, add the following lines to y light: platform: hue host: DEVICE_IP_ADDRESS - # Optional, make this unique if specifying multiple Hue hubs + allow_unreachable: true filename: my_hue_hub_token.conf ``` + +Configuration variables: + +- **host** (*Required*): IP address aof the device, eg. 192.168.1.10. +- **allow_unreachable** (*Optional*): This will allow unreachable bulbs to report their state correctly. By default *name* from the device is used. +- **filename** (*Optional*): Make this unique if specifying multiple Hue hubs. + diff --git a/source/_components/light.mqtt.markdown b/source/_components/light.mqtt.markdown index 4dace8936f7..bf933f726cf 100644 --- a/source/_components/light.mqtt.markdown +++ b/source/_components/light.mqtt.markdown @@ -66,9 +66,9 @@ Configuration variables: - **brightness_command_topic** (*Optional*): The MQTT topic to publish commands to change the light's brightness. - **rgb_state_topic** (*Optional*): The MQTT topic subscribed to receive RGB state updates. - **rgb_command_topic** (*Optional*): The MQTT topic to publish commands to change the light's RGB state. -- **state_value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract the state value. -- **brightness_value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract the brightness value. -- **rgb_value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract the RGB value. +- **state_value_template** (*Optional*): Defines a [template](/topics/templating/) to extract the state value. +- **brightness_value_template** (*Optional*): Defines a [template](/topics/templating/) to extract the brightness value. +- **rgb_value_template** (*Optional*): Defines a [template](/topics/templating/) to extract the RGB value. - **brightness_scale** (*Optional*): Defines the maximum brightness value (i.e. 100%) of the MQTT device (defaults to 255). - **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages. - **payload_on** (*Optional*): The payload that represents enabled state. Default is "ON". diff --git a/source/_components/lock.mqtt.markdown b/source/_components/lock.mqtt.markdown index a307db56649..b49309475ce 100644 --- a/source/_components/lock.mqtt.markdown +++ b/source/_components/lock.mqtt.markdown @@ -46,7 +46,7 @@ Configuration variables: - **optimistic** (*Optional*): Flag that defines if lock works in optimistic mode. Default is true if no state topic defined, else false. - **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages. - **retain** (*Optional*): If the published message should have the retain flag on or not. -- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload. +- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.

Make sure that your topic match exact. `some-topic/` and `some-topic` are different topics. diff --git a/source/_components/mqtt.markdown b/source/_components/mqtt.markdown index de4a8c04912..44bf80f8ba2 100644 --- a/source/_components/mqtt.markdown +++ b/source/_components/mqtt.markdown @@ -125,18 +125,21 @@ Home Assistant will automatically load the correct certificate if you connect to ## {% linkable_title Building on top of MQTT %} + - [MQTT Alarm control panel](/components/alarm_control_panel.mqtt/) + - [MQTT Binary sensor](/components/binary_sensor.mqtt/) - [MQTT Sensor](/components/sensor.mqtt/) - [MQTT Switch](/components/switch.mqtt/) - [MQTT Light](/components/light.mqtt/) + - [MQTT Lock](/components/lock.mqtt/) - [MQTT Device Tracker](/components/device_tracker.mqtt/) - [OwnTracks Device Tracker](/components/device_tracker.owntracks/) - [MQTT automation rule](/components/automation/#mqtt-based-automation) - - [MQTT alarm](/components/alarm_control_panel.mqtt/) + - Integrating it into own component. See the [MQTT example component](/cookbook/python_component_mqtt_basic/) how to do this. ### {% linkable_title Publish service %} -The MQTT component will register the service `publish` which allows publishing messages to MQTT topics. There are two ways of specifiying your payload. You can either use `payload` to hard-code a payload or use `payload_template` to specify a [template](/getting-started/templating/) that will be rendered to generate the payload. +The MQTT component will register the service `publish` which allows publishing messages to MQTT topics. There are two ways of specifiying your payload. You can either use `payload` to hard-code a payload or use `payload_template` to specify a [template](/topics/templating/) that will be rendered to generate the payload. ```json { diff --git a/source/_components/notify.google_voice.markdown b/source/_components/notify.google_voice.markdown index 83676fd3923..aa1a6901e3b 100644 --- a/source/_components/notify.google_voice.markdown +++ b/source/_components/notify.google_voice.markdown @@ -28,7 +28,7 @@ notify: Configuration variables: - **username** (*Required*): Enter your the Google email address you have signed up for Google Voice with. Go to https://www.google.com/voice to setup your Google Voice account. -- **password** (*Required*): Enter the password associated with the above email. Go to https://www.pushbullet.com/ to retrieve your API key. +- **password** (*Required*): Enter the password associated with the above email. - **name** (*Optional*): Setting the optional parameter `name` allows multiple notifiers to be created. The default value is `notify`. The notifier will bind to the service `notify.NOTIFIER_NAME`. ### Usage diff --git a/source/_components/notify.markdown b/source/_components/notify.markdown index f6d4f7b5350..d475db0cb2c 100644 --- a/source/_components/notify.markdown +++ b/source/_components/notify.markdown @@ -37,7 +37,7 @@ Once loaded, the `notify` platform will expose a service that can be called to s The notification component supports specifying [templates] for both the `message` and the `title`. This will allow you to use the current state of Home Assistant in your notifications. -[templates]: /getting-started/templating/ +[templates]: /topics/templating/ ### {% linkable_title Test if it works %} diff --git a/source/_components/rollershutter.mqtt.markdown b/source/_components/rollershutter.mqtt.markdown index b9cbb7d925e..51a840c3a91 100644 --- a/source/_components/rollershutter.mqtt.markdown +++ b/source/_components/rollershutter.mqtt.markdown @@ -42,4 +42,4 @@ Configuration variables: - **payload_up** (*Optional*): The payload to open the rollershutter. Default is "OPEN". - **payload_down** (*Optional*): The payload to close the rollershutter. Default is "CLOSE". - **payload_stop** (*Optional*): The payload to stop the rollershutter. Default is "STOP". -- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload. +- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload. diff --git a/source/_components/scene.hunterdouglas_powerview.markdown b/source/_components/scene.hunterdouglas_powerview.markdown index 72fb3e46702..d35c4e49ec0 100644 --- a/source/_components/scene.hunterdouglas_powerview.markdown +++ b/source/_components/scene.hunterdouglas_powerview.markdown @@ -8,7 +8,7 @@ comments: false sharing: true footer: true logo: hunter-douglas-powerview.png -ha_category: Organization +ha_category: Rollershutter --- Implements the [Hunter Douglas PowerView](http://www.hunterdouglas.com/operating-systems/powerview-motorization/support) platform scene control. It queries the PowerView Hub and Home Assistant displays them as scenes. @@ -24,4 +24,4 @@ scene: Configuration variables: -- **address** (*Required*): IP address of the PowerView Hub, eg. http://192.168.1.10. +- **address** (*Required*): IP address of the PowerView Hub, eg. 192.168.1.10. diff --git a/source/_components/scene.home_assistant.markdown b/source/_components/scene.markdown similarity index 100% rename from source/_components/scene.home_assistant.markdown rename to source/_components/scene.markdown diff --git a/source/_components/sensor.arest.markdown b/source/_components/sensor.arest.markdown index 08282b75107..40926089f5f 100644 --- a/source/_components/sensor.arest.markdown +++ b/source/_components/sensor.arest.markdown @@ -45,11 +45,11 @@ Configuration variables: - **monitored_variables** array (*Optional*): List of exposed variables. - **name** (*Required*): The name of the variable you wish to monitor. - **unit** (*Optional*): Defines the units of measurement of the sensor, if any. - - **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload. + - **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload. - **pins** array (*Optional*): List of pins to monitor. Analog pins need a leading **A** for the pin number. - **name** (*Optional*): The name of the variable you wish to monitor. - **unit_of_measurement** (*Optional*): Defines the unit of measurement of the sensor, if any. - - **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload. + - **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload. The variables in the `monitored_variables` array must be available in the response of the device. As a starting point you could use the one of the example sketches (eg. [Ethernet](https://raw.githubusercontent.com/marcoschwartz/aREST/master/examples/Ethernet/Ethernet.ino) for an Arduino with Ethernet shield). In those sketches are two variables (`temperature` and `humidity`) available which will act as endpoints. diff --git a/source/_components/sensor.command_line.markdown b/source/_components/sensor.command_line.markdown index 09f655f7b9e..0e26cae696f 100644 --- a/source/_components/sensor.command_line.markdown +++ b/source/_components/sensor.command_line.markdown @@ -31,7 +31,7 @@ Configuration variables: - **command** (*Required*): The action to take to get the value. - **name** (*Optional*): Name of the command sensor. - **unit_of_measurement** (*Optional*): Defines the unit of measurement of the sensor, if any. -- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload. +- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload. ## {% linkable_title Examples %} diff --git a/source/_components/sensor.mqtt.markdown b/source/_components/sensor.mqtt.markdown index 770ff862e15..7d55875f3f3 100644 --- a/source/_components/sensor.mqtt.markdown +++ b/source/_components/sensor.mqtt.markdown @@ -33,7 +33,7 @@ Configuration variables: - **name** (*Optional*): The name of the sensor. Default is 'MQTT Sensor'. - **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0. - **unit_of_measurement** (*Optional*): Defines the units of measurement of the sensor, if any. -- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload. +- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload. ## {% linkable_title Examples %} diff --git a/source/_components/sensor.rest.markdown b/source/_components/sensor.rest.markdown index c75a216dac7..5e55cdda28d 100644 --- a/source/_components/sensor.rest.markdown +++ b/source/_components/sensor.rest.markdown @@ -44,7 +44,7 @@ Configuration variables: - **resource** (*Required*): The resource or endpoint that contains the value. - **method** (*Optional*): The method of the request. Default is GET. -- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract the value. +- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract the value. - **payload** (*Optional*): The payload to send with a POST request. Usualy formed as a dictionary. - **name** (*Optional*): Name of the REST sensor. - **unit_of_measurement** (*Optional*): Defines the unit of measurement of the sensor, if any. diff --git a/source/_components/sensor.speedtest.markdown b/source/_components/sensor.speedtest.markdown index db0fc4ddd87..a2d22c2b205 100644 --- a/source/_components/sensor.speedtest.markdown +++ b/source/_components/sensor.speedtest.markdown @@ -72,4 +72,4 @@ Configuration variables: - **hour** (*Optional*): Specify the hour(s) of the day to schedule the speedtest. Use a list for multiple entries. Default is None. - **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 [speetest-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. +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. diff --git a/source/_components/sensor.tcp.markdown b/source/_components/sensor.tcp.markdown index b796c5e3b65..a6227a641bf 100644 --- a/source/_components/sensor.tcp.markdown +++ b/source/_components/sensor.tcp.markdown @@ -34,7 +34,7 @@ Configuration options for the a TCP Sensor: - **port** (*Required*): The port to connect to the host on. - **payload** (*Required*): What to send to the host in order to get the response we're interested in. - **timeout** (*Optional*): How long in seconds to wait for a response from the service before giving up and disconnecting. Defaults to `10` -- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract the value. By default it's assumed that the entire response is the value. +- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract the value. By default it's assumed that the entire response is the value. - **unit** (*Optional*): The unit of measurement to use for the value. - **buffer_size** (*Optional*): The size of the receive buffer in bytes. Set this to a larger value if you expect to receive a response larger than the default. Defaults to `1024`. diff --git a/source/_components/sensor.template.markdown b/source/_components/sensor.template.markdown index da6ec606d69..a792cb1cdae 100644 --- a/source/_components/sensor.template.markdown +++ b/source/_components/sensor.template.markdown @@ -32,7 +32,7 @@ Configuration variables: - **sensors** array (*Required*): List of your sensors. - **friendly_name** (*Optional*): Name to use in the Frontend. - **unit_of_measurement** (*Optional*): Defines the units of measurement of the sensor, if any. - - **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload. + - **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload. ## {% linkable_title Examples %} diff --git a/source/_components/switch.mqtt.markdown b/source/_components/switch.mqtt.markdown index cdd0b023c2a..746b0b26da1 100644 --- a/source/_components/switch.mqtt.markdown +++ b/source/_components/switch.mqtt.markdown @@ -46,7 +46,7 @@ Configuration variables: - **optimistic** (*Optional*): Flag that defines if switch works in optimistic mode. Default is true if no state topic defined, else false. - **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages. - **retain** (*Optional*): If the published message should have the retain flag on or not. -- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload. +- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.

Make sure that your topic match exact. `some-topic/` and `some-topic` are different topics. diff --git a/source/_components/switch.template.markdown b/source/_components/switch.template.markdown index ab789f34b9e..2f5f627ec29 100644 --- a/source/_components/switch.template.markdown +++ b/source/_components/switch.template.markdown @@ -38,7 +38,7 @@ Configuration variables: - **switches** array (*Required*): List of your switches. - **friendly_name** (*Optional*): Name to use in the Frontend. - - **value_template** (*Required*): Defines a [template](/getting-started/templating/) to set the state of the switch. + - **value_template** (*Required*): Defines a [template](/topics/templating/) to set the state of the switch. - **turn_on** (*Required*): Defines an [action](/getting-started/automation/) to run when the switch is turned on. - **turn_off** (*Required*): Defines an [action](/getting-started/automation/) to run when the switch is turned off. diff --git a/source/_components/tellstick.markdown b/source/_components/tellstick.markdown index 13124b11046..edca85a85b2 100644 --- a/source/_components/tellstick.markdown +++ b/source/_components/tellstick.markdown @@ -12,7 +12,7 @@ ha_category: Hub --- -The `tellstick` component integrates [TellStick](http://www.telldus.se/products/tellstick) devices into Home Assistant. This integration allows users to add switches, lights, and sensors which are communicating with 433 Mhz. There are couple of vendors (Capidi Elro, Intertechno, Nexa, Proove, Sartano, and Viking) how are selling products which works with TellStick. For more details, please check the TellStick [compatibility list](http://telldus.se/products/compability). +The `tellstick` component integrates [TellStick](http://www.telldus.se/products/tellstick) devices into Home Assistant. This integration allows users to add switches, lights, and sensors which are communicating with 433 Mhz. There are a number of vendors (Capidi Elro, Intertechno, Nexa, Proove, Sartano, and Viking) who are selling products that work with TellStick. For more details, please check the TellStick [compatibility list](http://telldus.se/products/compability). To get started, add the devices to your `configuration.yaml` file. diff --git a/source/_components/zwave.markdown b/source/_components/zwave.markdown index 554c8c8c573..d4d33d4d3cd 100644 --- a/source/_components/zwave.markdown +++ b/source/_components/zwave.markdown @@ -22,7 +22,13 @@ To allow Home Assistant to talk to your Z-Wave USB stick you will have to compil Make sure you have the correct dependencies installed before running the script: ```bash -$ apt-get install cython3 libudev-dev python3-sphinx python3-setuptools +$ sudo apt-get install cython3 libudev-dev python3-sphinx python3-setuptools +``` + +Make sure you have at least version 0.23 of cython. + +```bash +$ sudo pip3 install --upgrade cython ``` Then get the OpenZWave files and switch to the `python3` branch: @@ -37,7 +43,7 @@ $ sudo PYTHON_EXEC=`which python3` make install

Instead of `make install`, you can alternatively build your own python-openzwave package which can be easily uninstalled: -`$ sudo PYTHON_EXEC=`which python3` checkinstall --pkgname python-openzwave --pkgversion 1.0 --provides python-openzwave` +```$ sudo PYTHON_EXEC=`which python3` checkinstall --pkgname python-openzwave --pkgversion 1.0 --provides python-openzwave```

diff --git a/source/_cookbook/configuration_yaml_by_brusc.markdown b/source/_cookbook/configuration_yaml_by_brusc.markdown new file mode 100644 index 00000000000..762bf536e65 --- /dev/null +++ b/source/_cookbook/configuration_yaml_by_brusc.markdown @@ -0,0 +1,13 @@ +--- +layout: page +title: "Configuration.yaml by brusc" +description: "" +date: 2016-03-14 11:45 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Example configuration.yaml +ha_external_link: https://github.com/brusc/Home-Assistant-Configuration +--- + diff --git a/source/_cookbook/configuration_yaml_from_bassclarinetl2 b/source/_cookbook/configuration_yaml_from_bassclarinetl2 new file mode 100644 index 00000000000..91af768b15e --- /dev/null +++ b/source/_cookbook/configuration_yaml_from_bassclarinetl2 @@ -0,0 +1,446 @@ +homeassistant: + # Name of the location where Home Assistant is running + name: example.com + # Location required to calculate the time the sun rises and sets + latitude: 37 + longitude: -121 + # C for Celcius, F for Fahrenheit + temperature_unit: F + # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones + time_zone: America/Los_Angeles + customize: + switch.aeon_labs_smart_energy_switch_switch_2: + friendly_name: Mac Switch-Meter + switch.leviton_unknown_type1a02_id0334_switch_3: + friendly_name: W Nightstand + entity_picture: /local/zwvapl.jpg + switch.hub_switch: + friendly_name: Wink Hub Switch + entity_picture: /local/wemoswitch.jpg + switch.leviton_unknown_type1a02_id0334_switch_4: + friendly_name: Christmas Tree + entity_picture: /local/zwvapl.jpg + switch.leviton_unknown_type1a02_id0334_switch_5: + friendly_name: Roof Lights + entity_picture: /local/zwvapl.jpg + + light.w_bedroom_ceiling_: + friendly_name: Will's Bedroom Ceiling Lights (Wink) + entity_picture: /local/casetta.jpg + light.living_room_wall_: + friendly_name: Living Room Couch Lights (Wink) + entity_picture: /local/casetta.jpg + + media_player.my_shield_android_tv: + friendly_name: Dalek (Cast) + entity_picture: /local/shieldtv.jpg + media_player.chromecast: + friendly_name: Jeff chromecast + entity_picture: /local/chromecast.jpg + media_player.kodi: + friendly_name: Tardis-Win7 (Kodi) + entity_picture: /local/kodi.png + media_player.kodi_2: + friendly_name: Dalek (Kodi) + media_player.roku_2_xd__12a18n045363: + friendly_name: Parents Roku + entity_picture: /local/roku2xd.jpg + + sensor.aeon_labs_smart_energy_switch_power_2: + friendly_name: Mac Usage (W) + sensor.aeon_labs_smart_energy_switch_previous_reading_2: + friendly_name: Mac Usage Previous (W) + hidden: true + sensor.aeon_labs_smart_energy_switch_energy_2: + friendly_name: Mac Usage (kWh) + hidden: true + +##################### +## GROUPS +##################### +group: + w_bedroom: + - switch.leviton_unknown_type1a02_id0334_switch_3 + - light.w_bedroom_ceiling_ + christmas: + - switch.leviton_unknown_type1a02_id0334_switch_4 + - switch.leviton_unknown_type1a02_id0334_switch_5 + almanac: + - sensor.date + - sensor.time + - sensor.time_utc + - sun.sun + tracker: + - device_tracker.will_wnexus +# OpenWeatherMap: +# - sensor.weather_temperature +# - sensor.weather_humidity +# - sensor.weather_pressure +# - sensor.weather_rain +# - sensor.weather_wind_speed +# - sensor.weather_cloud_coverage +# - sensor.weather_forecast + Meteobridge: + - sensor.outdoor_temp_meteobridge + - sensor.outdoor_humidity_meteobridge + - sensor.outdoor_dewpoint_meteobridge + - sensor.precip_rate_meteobridge + - sensor.wind_direction_meteobridge + - sensor.wind_gust_meteohub + - sensor.wind_chill_meteobridge + - sensor.wind_speed_meteobridge + - sensor.indoor_dewpoint_meteobridge + - sensor.indoor_humidity_meteobridge + - sensor.indoor_temp_meteobridge + - sensor.precip_change_meteobridge + - sensor.precip_total_meteobridge + - sensor.sea_level_pressure_meteobridge + - sensor.barometric_pressure_meteobridge + +#################### +## ZONES +#################### +zone: + name: Home + latitude: 37 + longitude: -121 + radius: 200 + icon: mdi:home + +zone 2: + name: Barracuda_(SJ) + latitude: 37 + longitude: -121 + radius: 100 + +zone 3: + name: SFC + latitude: 37 + longitude: -122 + radius: 95 + +#################### +## NOTIFICATIONS +#################### + + +#################### +## AUTOMATION +#################### +automation: +#- alias: 'W_at_work' +# trigger: +# - platform: zone +# entity_id: device_tracker.will_wnexus +# zone: zone.barracuda_sj +# event: enter +# - platform: time +# after: '07:15' +# before: '09:00' +# action: +# service: ifttt.trigger +# data: {"event":"hassnotification_dadsms", "value1": "Will's at Work"} +- alias: "Update_Update" + trigger: + platform: state + entity_id: updater.updater + action: + service: ifttt.trigger + data: {"event":"hassnotification_willsms","value1":"HASS has an update"} +- alias: 'Christmas Roof ON' + trigger: + platform: sun + event: sunset + offset: '-01:00:00' + action: + service: homeassistant.turn_on + entity_id: switch.leviton_unknown_type1a02_id0334_switch_5 +- alias: 'Christmas Roof OFF' + trigger: + platform: time + hours: 1 + minutes: 0 + seconds: 0 + action: + service: homeassistant.turn_off + entity_id: switch.leviton_unknown_type1a02_id0334_switch_5 +- alias: 'Christmas Tree ON' + trigger: + platform: time + hours: 8 + minutes: 0 + seconds: 0 + action: + service: homeassistant.turn_on + entity_id: switch.leviton_unknown_type1a02_id0334_switch_4 +- alias: 'Christmas Tree (OFF)' + trigger: + platform: time + hours: 23 + minutes: 0 + seconds: 0 + action: + service: homeassistant.turn_off + entity_id: switch.leviton_unknown_type1a02_id0334_switch_4 +#- alias: test notify +# trigger: +# platform: time +# minutes: '/5' #every 5 min +# action: +# service: notify.pushEtta +# data: +# message: 5 Min Test + + +################################# +### COMPONENTS ### +################################# +#discovery: +sun: +#updater: +history: +#conversation: +frontend: +logbook: + +http: + api_password: Austin12# + server_port: 8123 + ssl_certificate: /etc/letsencrypt/live/example.com/fullchain.pem + ssl_key: /etc/letsencrypt/live/example.com/privkey.pem + +ifttt: + key: gm3dAtxwX8RpbA793mHWbK1bftO1wgScKt0ZHiT9GyC + +media_player 1: + platform: plex +#media_player 2: +# platform: squeezebox +# host: 192.168.2.80 +# port: 9000 +media_player 3: + platform: cast +media_player 4: + platform: kodi + url: http://192.168.2.129:8080/jsonrpc + user: kodi + password: kodi +media_player 5: + platform: plex +media_player 6: + platform: kodi + url: http://192.168.2.165/jsonrpc +media_player 7: + platform: samsungtv + host: 192.168.2.90 + name: Parents TV + +wink: + access_token: cf83448f669cd3acd3b969b063028565 + refresh_token: 6213c8a1d519d864e08b7364c91eaf22 + +zwave: + usb_path: /dev/ttyUSB0 + config_path: /usr/local/share/python-openzwave/config + polling_interval: 10000 + +#zigbee: +# device: /dev/ttyUSB1 +# baud: 115200 + +mqtt: + broker: 127.0.0.1 + port: 8883 + username: hass + password: austin + +device_tracker 1: + platform: owntracks + + track_new_devices: yes + interval_seconds: 40 + consider_home: 120 + +device_tracker 2: + platform: nmap_tracker + hosts: 192.168.2.0/24 + home_interval: 3 + +#sensor: +# platform: openweathermap +# api_key: b693a8bb2f60dcedc7b4bf33649ed4f1 +# forecast: 1 +# monitored_conditions: +# - temperature +# - wind_speed +# - humidity +# - pressure +# - clouds +# - rain + +sensor 2: + platform: time_date + display_options: + - 'time' + - 'date' + - 'time_utc' + +### BEGIN METEO SENSORS ### +sensor 3: + platform: tcp + name: Outdoor Temp (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charset=UTF-8\n\n" + value_template: "{{value.split (' ')[2]}}" + unit: C + +sensor 4: + platform: tcp + name: Outdoor Humidity (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charset=UTF-8\n\n" + value_template: "{{value.split (' ')[3]}}" + unit: Percent + +sensor 5: + platform: tcp + name: Outdoor Dewpoint (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charset=UTF-8\n\n" + value_template: "{{value.split (' ')[4] }}" + unit: C + +sensor 6: + platform: tcp + name: Wind Direction (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charset=UTF-8\n\n" + value_template: "{{value.split (' ')[7]}}" + unit: Degrees + +sensor 7: + platform: tcp + name: Wind Gust (Meteohub) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charset=UTF-8\n\n" + value_template: "{{value.split (' ')[8]}}" + unit: m/s + +sensor 8: + platform: tcp + name: Wind Speed (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charset=UTF-8\n\n" + value_template: "{{value.split (' ')[9]}}" + unit: m/s + +sensor 9: + platform: tcp + name: Wind Chill (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charset=UTF-8\n\n" + value_template: "{{value.split (' ')[10]}}" + unit: C + +sensor 10: + platform: tcp + name: Precip Rate (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charset=UTF-8\n\n" + value_template: "{{value.split (' ')[13]}}" + unit: mm/hr + +sensor 11: + platform: tcp + name: Precip Total (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charaset=UTF-8\n\n" + value_template: "{{value.split (' ')[14]}}" + unit: mm + +sensor 12: + platform: tcp + name: Precip Change (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charaset=UTF-8\n\n" + value_template: "{{value.split (' ')[15]}}" + unit: mm + +sensor 13: + platform: tcp + name: Indoor Temp (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charaset=UTF-8\n\n" + value_template: "{{value.split (' ')[18]}}" + unit: C + +sensor 14: + platform: tcp + name: Indoor Humidity (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charaset=UTF-8\n\n" + value_template: "{{value.split (' ')[19]}}" + unit: percent + +sensor 15: + platform: tcp + name: Indoor Dewpoint (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charaset=UTF-8\n\n" + value_template: "{{value.split (' ')[20]}}" + unit: C + +sensor 16: + platform: tcp + name: Barometric Pressure (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charaset=UTF-8\n\n" + value_template: "{{value.split (' ')[21]}}" + unit: mb + +sensor 17: + platform: tcp + name: Sea Level Pressure (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charaset=UTF-8\n\n" + value_template: "{{value.split (' ')[22]}}" + unit: mb + +sensor 18: + platform: steam_online + api_key: [Redact] + accounts: + - 76561198012067051 + +switch: + platform: wemo diff --git a/source/_cookbook/configuration_yaml_from_bassclarinetl2.markdown b/source/_cookbook/configuration_yaml_from_bassclarinetl2.markdown new file mode 100644 index 00000000000..90f2298fa69 --- /dev/null +++ b/source/_cookbook/configuration_yaml_from_bassclarinetl2.markdown @@ -0,0 +1,460 @@ +--- +layout: page +title: "Configuration.yaml by bassclarinetl2" +description: "" +date: 2016-03-24 17:00 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Example configuration.yaml +--- + +```yaml +homeassistant: + # Name of the location where Home Assistant is running + name: example.com + # Location required to calculate the time the sun rises and sets + latitude: 37 + longitude: -121 + # C for Celcius, F for Fahrenheit + temperature_unit: F + # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones + time_zone: America/Los_Angeles + customize: + switch.aeon_labs_smart_energy_switch_switch_2: + friendly_name: Mac Switch-Meter + switch.leviton_unknown_type1a02_id0334_switch_3: + friendly_name: W Nightstand + entity_picture: /local/zwvapl.jpg + switch.hub_switch: + friendly_name: Wink Hub Switch + entity_picture: /local/wemoswitch.jpg + switch.leviton_unknown_type1a02_id0334_switch_4: + friendly_name: Christmas Tree + entity_picture: /local/zwvapl.jpg + switch.leviton_unknown_type1a02_id0334_switch_5: + friendly_name: Roof Lights + entity_picture: /local/zwvapl.jpg + + light.w_bedroom_ceiling_: + friendly_name: Will's Bedroom Ceiling Lights (Wink) + entity_picture: /local/casetta.jpg + light.living_room_wall_: + friendly_name: Living Room Couch Lights (Wink) + entity_picture: /local/casetta.jpg + + media_player.my_shield_android_tv: + friendly_name: Dalek (Cast) + entity_picture: /local/shieldtv.jpg + media_player.chromecast: + friendly_name: Jeff chromecast + entity_picture: /local/chromecast.jpg + media_player.kodi: + friendly_name: Tardis-Win7 (Kodi) + entity_picture: /local/kodi.png + media_player.kodi_2: + friendly_name: Dalek (Kodi) + media_player.roku_2_xd__12a18n045363: + friendly_name: Parents Roku + entity_picture: /local/roku2xd.jpg + + sensor.aeon_labs_smart_energy_switch_power_2: + friendly_name: Mac Usage (W) + sensor.aeon_labs_smart_energy_switch_previous_reading_2: + friendly_name: Mac Usage Previous (W) + hidden: true + sensor.aeon_labs_smart_energy_switch_energy_2: + friendly_name: Mac Usage (kWh) + hidden: true + +##################### +## GROUPS +##################### +group: + w_bedroom: + - switch.leviton_unknown_type1a02_id0334_switch_3 + - light.w_bedroom_ceiling_ + christmas: + - switch.leviton_unknown_type1a02_id0334_switch_4 + - switch.leviton_unknown_type1a02_id0334_switch_5 + almanac: + - sensor.date + - sensor.time + - sensor.time_utc + - sun.sun + tracker: + - device_tracker.will_wnexus +# OpenWeatherMap: +# - sensor.weather_temperature +# - sensor.weather_humidity +# - sensor.weather_pressure +# - sensor.weather_rain +# - sensor.weather_wind_speed +# - sensor.weather_cloud_coverage +# - sensor.weather_forecast + Meteobridge: + - sensor.outdoor_temp_meteobridge + - sensor.outdoor_humidity_meteobridge + - sensor.outdoor_dewpoint_meteobridge + - sensor.precip_rate_meteobridge + - sensor.wind_direction_meteobridge + - sensor.wind_gust_meteohub + - sensor.wind_chill_meteobridge + - sensor.wind_speed_meteobridge + - sensor.indoor_dewpoint_meteobridge + - sensor.indoor_humidity_meteobridge + - sensor.indoor_temp_meteobridge + - sensor.precip_change_meteobridge + - sensor.precip_total_meteobridge + - sensor.sea_level_pressure_meteobridge + - sensor.barometric_pressure_meteobridge + +#################### +## ZONES +#################### +zone: + name: Home + latitude: 37 + longitude: -121 + radius: 200 + icon: mdi:home + +zone 2: + name: Barracuda_(SJ) + latitude: 37 + longitude: -121 + radius: 100 + +zone 3: + name: SFC + latitude: 37 + longitude: -122 + radius: 95 + +#################### +## NOTIFICATIONS +#################### + + +#################### +## AUTOMATION +#################### +automation: +#- alias: 'W_at_work' +# trigger: +# - platform: zone +# entity_id: device_tracker.will_wnexus +# zone: zone.barracuda_sj +# event: enter +# - platform: time +# after: '07:15' +# before: '09:00' +# action: +# service: ifttt.trigger +# data: {"event":"hassnotification_dadsms", "value1": "Will's at Work"} +- alias: "Update_Update" + trigger: + platform: state + entity_id: updater.updater + action: + service: ifttt.trigger + data: {"event":"hassnotification_willsms","value1":"HASS has an update"} +- alias: 'Christmas Roof ON' + trigger: + platform: sun + event: sunset + offset: '-01:00:00' + action: + service: homeassistant.turn_on + entity_id: switch.leviton_unknown_type1a02_id0334_switch_5 +- alias: 'Christmas Roof OFF' + trigger: + platform: time + hours: 1 + minutes: 0 + seconds: 0 + action: + service: homeassistant.turn_off + entity_id: switch.leviton_unknown_type1a02_id0334_switch_5 +- alias: 'Christmas Tree ON' + trigger: + platform: time + hours: 8 + minutes: 0 + seconds: 0 + action: + service: homeassistant.turn_on + entity_id: switch.leviton_unknown_type1a02_id0334_switch_4 +- alias: 'Christmas Tree (OFF)' + trigger: + platform: time + hours: 23 + minutes: 0 + seconds: 0 + action: + service: homeassistant.turn_off + entity_id: switch.leviton_unknown_type1a02_id0334_switch_4 +#- alias: test notify +# trigger: +# platform: time +# minutes: '/5' #every 5 min +# action: +# service: notify.pushEtta +# data: +# message: 5 Min Test + + +################################# +### COMPONENTS ### +################################# +#discovery: +sun: +#updater: +history: +#conversation: +frontend: +logbook: + +http: + api_password: Austin12# + server_port: 8123 + ssl_certificate: /etc/letsencrypt/live/example.com/fullchain.pem + ssl_key: /etc/letsencrypt/live/example.com/privkey.pem + +ifttt: + key: gm3dAtxwX8RpbA793mHWbK1bftO1wgScKt0ZHiT9GyC + +media_player 1: + platform: plex +#media_player 2: +# platform: squeezebox +# host: 192.168.2.80 +# port: 9000 +media_player 3: + platform: cast +media_player 4: + platform: kodi + url: http://192.168.2.129:8080/jsonrpc + user: kodi + password: kodi +media_player 5: + platform: plex +media_player 6: + platform: kodi + url: http://192.168.2.165/jsonrpc +media_player 7: + platform: samsungtv + host: 192.168.2.90 + name: Parents TV + +wink: + access_token: cf83448f669cd3acd3b969b063028565 + refresh_token: 6213c8a1d519d864e08b7364c91eaf22 + +zwave: + usb_path: /dev/ttyUSB0 + config_path: /usr/local/share/python-openzwave/config + polling_interval: 10000 + +#zigbee: +# device: /dev/ttyUSB1 +# baud: 115200 + +mqtt: + broker: 127.0.0.1 + port: 8883 + username: hass + password: austin + +device_tracker 1: + platform: owntracks + + track_new_devices: yes + interval_seconds: 40 + consider_home: 120 + +device_tracker 2: + platform: nmap_tracker + hosts: 192.168.2.0/24 + home_interval: 3 + +#sensor: +# platform: openweathermap +# api_key: b693a8bb2f60dcedc7b4bf33649ed4f1 +# forecast: 1 +# monitored_conditions: +# - temperature +# - wind_speed +# - humidity +# - pressure +# - clouds +# - rain + +sensor 2: + platform: time_date + display_options: + - 'time' + - 'date' + - 'time_utc' + +### BEGIN METEO SENSORS ### +sensor 3: + platform: tcp + name: Outdoor Temp (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charset=UTF-8\n\n" + value_template: "{{value.split (' ')[2]}}" + unit: C + +sensor 4: + platform: tcp + name: Outdoor Humidity (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charset=UTF-8\n\n" + value_template: "{{value.split (' ')[3]}}" + unit: Percent + +sensor 5: + platform: tcp + name: Outdoor Dewpoint (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charset=UTF-8\n\n" + value_template: "{{value.split (' ')[4] }}" + unit: C + +sensor 6: + platform: tcp + name: Wind Direction (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charset=UTF-8\n\n" + value_template: "{{value.split (' ')[7]}}" + unit: Degrees + +sensor 7: + platform: tcp + name: Wind Gust (Meteohub) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charset=UTF-8\n\n" + value_template: "{{value.split (' ')[8]}}" + unit: m/s + +sensor 8: + platform: tcp + name: Wind Speed (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charset=UTF-8\n\n" + value_template: "{{value.split (' ')[9]}}" + unit: m/s + +sensor 9: + platform: tcp + name: Wind Chill (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charset=UTF-8\n\n" + value_template: "{{value.split (' ')[10]}}" + unit: C + +sensor 10: + platform: tcp + name: Precip Rate (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charset=UTF-8\n\n" + value_template: "{{value.split (' ')[13]}}" + unit: mm/hr + +sensor 11: + platform: tcp + name: Precip Total (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charaset=UTF-8\n\n" + value_template: "{{value.split (' ')[14]}}" + unit: mm + +sensor 12: + platform: tcp + name: Precip Change (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charaset=UTF-8\n\n" + value_template: "{{value.split (' ')[15]}}" + unit: mm + +sensor 13: + platform: tcp + name: Indoor Temp (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charaset=UTF-8\n\n" + value_template: "{{value.split (' ')[18]}}" + unit: C + +sensor 14: + platform: tcp + name: Indoor Humidity (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charaset=UTF-8\n\n" + value_template: "{{value.split (' ')[19]}}" + unit: percent + +sensor 15: + platform: tcp + name: Indoor Dewpoint (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charaset=UTF-8\n\n" + value_template: "{{value.split (' ')[20]}}" + unit: C + +sensor 16: + platform: tcp + name: Barometric Pressure (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charaset=UTF-8\n\n" + value_template: "{{value.split (' ')[21]}}" + unit: mb + +sensor 17: + platform: tcp + name: Sea Level Pressure (Meteobridge) + host: 192.168.2.82 + port: 5556 + timeout: 6 + payload: "Content-type: text/xml; charaset=UTF-8\n\n" + value_template: "{{value.split (' ')[22]}}" + unit: mb + +sensor 18: + platform: steam_online + api_key: [Redact] + accounts: + - 76561198012067051 + +switch: + platform: wemo +``` diff --git a/source/_cookbook/python_component_basic_state.markdown b/source/_cookbook/python_component_basic_state.markdown index 3eca0d8bbab..7a95cec30ad 100644 --- a/source/_cookbook/python_component_basic_state.markdown +++ b/source/_cookbook/python_component_basic_state.markdown @@ -10,34 +10,116 @@ footer: true ha_category: Custom Python Component Examples --- -This is a simple hello world example to show the basics for setting a state. To use this example, create the file `/custom_components/hello_state.py` and copy the below example code. +This is a simple tutorial/example on how to write a component for [Home Assistant](https://home-assistant.io/). We will work on a component called "hello_state" to beginn with. The purpose of this component is to display a given text in the frontend. + +The setup of a development environment is described in the [Developers section](/developers/#starting-development) of the documentation. + +## {% linkable_title Component %} + +To get started, create the file `/custom_components/hello_state.py` and copy the below example code. ```python -# The domain of your component. Should be equal to the name of your component. +""" +Support for showing text in the frontend. + +For more details about this component, please refer to the documentation at +https://home-assistant.io/components/hello_state/ +""" +import logging + +_LOGGER = logging.getLogger(__name__) + DOMAIN = 'hello_state' +DEPENDENCIES = [] -CONF_NAME = 'name' -DEFAULT_NAME = 'World' +def setup(hass, config=None): + """Setup the Hello State component. """ + _LOGGER.info("The 'hello state' component is ready!") - -def setup(hass, config): - """Setup is called when Home Assistant is loading our component.""" - - # Get the name from the configuration. Use DEFAULT_NAME if no name provided. - name = config[DOMAIN].get(CONF_NAME, DEFAULT_NAME) - - # States are in the format DOMAIN.OBJECT_ID - hass.states.set('hello_state.hello', name) - - # Return boolean to indicate that initialization was successfully. return True ``` -Load the component by adding the following to your `configuration.yaml`: +1. In the file header we decided to add some details: A short description and the link to the documentation. +2. We want to do some logging. This means that we import the Python logging module and create an alias. +3. The component name is equal to the domain name. +4. At the moment this component has no dependencies. For detail check [dependencies](/developers/creating_components/#dependencies) section. +5. The `setup` function will take care of the initialization of our component. + The component will only write a log message. Keep in mind for later that you have several options for the severity: + + - `_LOGGER.info(msg)` + - `_LOGGER.warning(msg)` + - `_LOGGER.error(msg)` + - `_LOGGER.critical(msg)` + - `_LOGGER.exception(msg)` + +7. We return `True` if everything is ok. + +Add the component to your `configuration.yaml` file. ```yaml -# configuration.yaml entry hello_state: - # optional - name: Paulus ``` + +After a start or a restart of Home Assistant the component will create an entry in the log. + +```bash +16-03-12 14:16:42 INFO (MainThread) [custom_components.hello_state] The 'hello state' component is ready! +``` + +The next step is the introduction of configuration options. Most configuration details are coming out of the `configuration.yaml` file. To do that we need to update the `def setup()` method to accept configuration information and access the configuration variable in the `setup` method. + +More details about this topic can be found in the [User given configuration](/developers/creating_components/#config-user-given-configuration) section. + +```python +import logging + +_LOGGER = logging.getLogger(__name__) + +DOMAIN = 'hello_state' +DEPENDENCIES = [] + +CONF_TEXT = 'text' +DEFAULT_TEXT = 'No text!' + +def setup(hass, config): + """Setup the Hello State component. """ + # Get the text from the configuration. Use DEFAULT_TEXT if no name is provided. + text = config[DOMAIN].get(CONF_TEXT, DEFAULT_TEXT) + + # States are in the format DOMAIN.OBJECT_ID + hass.states.set('hello_state.Hello_State', text) + + return True +``` + +To add the latest feature of our component, update the entry in your `configuration.yaml` file. + +```yaml +information: + text: 'Hello, World!' +``` + +Thanks to `DEFAULT_TEXT` variable the component will launch even if no `text:` field is used in the `configuration.yaml` file. Quite often there are variables which are required. It's important to check if all mandatory configuration variables are provided. If not, the setup should fail. We will use the `validate_config` function as a helper to achive this. The next listing shows the essential parts. + +```python +from homeassistant.helpers import validate_config +[...] + if not validate_config(config, {DOMAIN: [CONF_TEXT]}, _LOGGER): + return False +``` + +If `text:` is missing, there will be a warning in the log file. + +```bash +16-03-12 14:37:37 ERROR (MainThread) [custom_components.hello_state] Missing required configuration items in hello_state: text +16-03-12 14:37:37 ERROR (MainThread) [homeassistant.bootstrap] component hello_state failed to initialize +``` + +After a start or a restart of Home Assistant the component will be visible in the frontend if the `configuration.yaml` file is up-to-date. + +

+ +

+ +To get your component included in the Home Assistant releases, follow the steps described in the [Submitting improvements](https://home-assistant.io/developers/#submitting-improvements) section. Basically you only need to move your component in the `homeassistant/component/` directory of your fork and create a Pull Request. + diff --git a/source/_includes/custom/navigation.html b/source/_includes/custom/navigation.html index 84ed51ce775..2653839f67b 100644 --- a/source/_includes/custom/navigation.html +++ b/source/_includes/custom/navigation.html @@ -3,11 +3,11 @@ Getting started
  • Components
  • @@ -17,12 +17,12 @@