mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +00:00
Merge pull request #113 from fabaff/multiple-entries
Multiple entries in config file
This commit is contained in:
commit
05423c9b6f
@ -11,7 +11,7 @@ footer: true
|
||||
|
||||
The `notify` component makes it possible to send notifications to a wide variety of platforms. Please check the sidebar for a full list of platforms that are supported.
|
||||
|
||||
### Configuration
|
||||
## {% linkable_title Configuration %}
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
@ -25,7 +25,7 @@ notify:
|
||||
|
||||
The **name** parameter is optional but needed if you want to use multiple platforms. The platform will be exposed as service `notify/<name>`. The name will default to `notify` if not supplied.
|
||||
|
||||
### Service
|
||||
### {% linkable_title Service %}
|
||||
|
||||
Once loaded, the `notify` platform will expose a service that can be called to send notifications.
|
||||
|
||||
@ -35,8 +35,7 @@ Once loaded, the `notify` platform will expose a service that can be called to s
|
||||
| `title` | yes | Title of the notification. Default is `Home Assistant`.
|
||||
| `target` | yes | Some platforms will allow specifying a recipient that will receive the notification. See your platform page if it is supported.
|
||||
|
||||
|
||||
### Test if it works
|
||||
### {% linkable_title Test if it works %}
|
||||
|
||||
A simple way to test if you have set up your notify platform correctly is to use **Call Service** from the **Developer Tools** to call your notify service. Choose your service (*notify/xyz*) from the list of **Available services:** and enter something like the sample below into the **Service Data** field and hit **CALL SERVICE**.
|
||||
|
||||
|
@ -11,14 +11,52 @@ footer: true
|
||||
|
||||
Home Assistant will be able to automatically discover and configure any Google Chromecasts, Netgear routers, Belkin WeMo switches, Philips Hue bridges and Sonos speakers in your network if you have [the discovery component]({{site_root}}/components/discovery/) enabled (which is by default).
|
||||
|
||||
See the [components overview page](/components/) to find installation instructions for your devices and services. Many components use the `sensor` platform. Sensors need to be added into the `configuration.yaml` as `sensor:`, `sensor 2:`, `sensor 3:`, etc. There should not be gaps in the sequence or your sensors might not load correctly.
|
||||
See the [components overview page](/components/) to find installation instructions for your devices and services. If you can't find support for your favorite device or service, [consider adding support](/developers/add_new_platform/).
|
||||
|
||||
<p class='note'>
|
||||
Most components that support multiple entries within the <code>configuration.yaml</code> follow the <code>component:</code>, <code>component 2:</code> format.
|
||||
Usually every entity needs its own entry in the `configuration.yaml` file. There are two kind of styles for multiple entries:
|
||||
|
||||
#### {% linkable_title Style 1 %}
|
||||
|
||||
Collect every entity under the "parent".
|
||||
|
||||
```yaml
|
||||
sensor:
|
||||
- platform: mqtt
|
||||
state_topic: "home/bedroom/temperature"
|
||||
name: "MQTT Sensor 1"
|
||||
- platform: mqtt
|
||||
state_topic: "home/kitchen/temperature"
|
||||
name: "MQTT Sensor 2"
|
||||
- platform: rest
|
||||
resource: http://IP_ADDRESS/ENDPOINT
|
||||
|
||||
switch:
|
||||
- platform: vera
|
||||
```
|
||||
|
||||
#### {% linkable_title Style 2 %}
|
||||
|
||||
If you prefer to place your entries somewhere in the `configuration.yaml` file then you just choose this style. You need to append numbers (see example below) or strings (like `media_player livingroom:` or `media_player kitchen:`) to differentiate the entries. The appended number or string must be unique.
|
||||
|
||||
```yaml
|
||||
media_player 1:
|
||||
platform: mpd
|
||||
server: IP_ADDRESS
|
||||
|
||||
media_player 2:
|
||||
platform: plex
|
||||
|
||||
camera:
|
||||
platform: generic
|
||||
|
||||
media_player 3:
|
||||
platform: sonos
|
||||
```
|
||||
|
||||
<p class='note note'>
|
||||
If your devices are not showing up in the frontend then check the entries in your <code>configuration.yaml</code> file for duplicates.
|
||||
</p>
|
||||
|
||||
If you can't find support for your favorite device or service, [consider adding support](/developers/add_new_platform/)
|
||||
|
||||
### {% linkable_title Grouping devices %}
|
||||
|
||||
Once you get a bunch of devices set up, it is time to organize them. This can be done using groups. Each group exists of a name and a list of entity IDs. Entity IDs can be retrieved from the web interface by using the Set State page in the Developer Tools (icon in the middle).
|
||||
|
Loading…
x
Reference in New Issue
Block a user