Skip to content

Commit f7cc223

Browse files
authored
Add multiple TVs example to webostv (home-assistant#11819)
* Add multiple TVs example to webostv * Some heading fixes
1 parent ba7c4fd commit f7cc223

File tree

1 file changed

+41
-26
lines changed

1 file changed

+41
-26
lines changed

source/_integrations/webostv.markdown

Lines changed: 41 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,13 @@ There is currently support for the following device types within Home Assistant:
1818
- [Media Player](#media-player)
1919
- [Notifications](#notifications)
2020

21-
2221
To begin with enable *LG Connect Apps* feature in *Network* settings of the TV [instructions](https://www.lg.com/uk/support/product-help/CT00008334-1437131798537-others).
2322

2423
Once basic configuration is added to your `configuration.yaml` file. A notification should be visible in the frontend's **Notification** section. Follow the instructions and accept the pairing request on your TV.
2524

2625
Pairing information will be saved to a configuration file `webostv.conf` in the Home Assistant configuration directory. This process is IP address-sensitive, in case the IP address of your TV would change in future.
2726

28-
### Configuration
27+
## Configuration
2928

3029
To add a TV to your installation, add the following to your `configuration.yaml` file:
3130

@@ -63,7 +62,7 @@ customize:
6362
type: list
6463
{% endconfiguration %}
6564

66-
### Example
65+
### Full configuration example
6766

6867
A full configuration example will look like the sample below:
6968

@@ -83,15 +82,31 @@ webostv:
8382
- youtube
8483
- makotv
8584
- netflix
86-
85+
8786
media_player:
8887
8988
notify:
9089
```
9190

9291
Avoid using `[ ]` in the `name:` of your device.
9392

94-
### Turn on action
93+
### Using multiple TVs
94+
95+
It is also possible to use multiple TVs with this integration.
96+
97+
```yaml
98+
# Example configuration.yaml entry with multiple TVs
99+
webostv:
100+
- name: Living Room TV
101+
host: 192.168.1.100
102+
- name: Bedroom TV
103+
host: 192.168.1.101
104+
```
105+
106+
Please note, the above provides a minimal example, however, all options are
107+
available for each individual TV.
108+
109+
## Turn on action
95110

96111
Home Assistant is able to turn on a LG webOS Smart TV if you specify an action, like HDMI-CEC or WakeOnLan.
97112

@@ -118,11 +133,11 @@ notify:
118133
119134
Any other [actions](/docs/automation/action/) to power on the device can be configured.
120135
121-
### Sources
136+
## Sources
122137
123138
To obtain complete list of available sources currently configured on the TV, once the webOS TV is configured and linked, while its powered on head to the **Developer Tools** > **States**, find your `media_player.<name>` and use the sources listed in `source_list:` remembering to split them per line into your `sources:` configuration.
124139

125-
### Change channel through play_media service
140+
## Change channel through play_media service
126141

127142
The `play_media` service can be used in a script to switch to the specified tv channel. It selects the best matching channel according to the `media_content_id` parameter:
128143

@@ -146,32 +161,32 @@ data:
146161
media_content_type: "channel"
147162
```
148163

149-
### Next/Previous buttons
164+
## Next/Previous buttons
150165

151166
The behaviour of the next and previous buttons is different depending on the active source:
152167

153-
- if the source is 'LiveTV' (television): next/previous buttons act as channel up/down
154-
- otherwise: next/previous buttons act as next/previous track
168+
- if the source is 'LiveTV' (television): next/previous buttons act as channel up/down
169+
- otherwise: next/previous buttons act as next/previous track
155170

156-
### Generic commands and buttons
171+
## Services
157172

158173
Available services: `button`, `command`
159174

160-
#### Service `webostv.button`
161-
162-
| Service data attribute | Optional | Description |
163-
|------------------------|----------|---------------------------------------------------------|
164-
| `entity_id` | no | Target a specific webostv media player. |
165-
| `button` | no | Name of the button. Known possible values are `LEFT`, `RIGHT`, `DOWN`, `UP`, `HOME`, `BACK`, `ENTER`, `DASH`, `INFO`, `ASTERISK`, `CC`, `EXIT`, `MUTE`, `RED`, `GREEN`, `BLUE`, `VOLUMEUP`, `VOLUMEDOWN`, `CHANNELUP`, `CHANNELDOWN`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9` |
166-
167-
#### Service `webostv.command`
168-
169-
| Service data attribute | Optional | Description |
170-
|------------------------|----------|---------------------------------------------------------|
171-
| `entity_id` | no | Target a specific webostv media player. |
172-
| `command` | no | Endpoint for the command, e.g. `media.controls/rewind`. The full list of known endpoints is available at https://github.com/bendavid/aiopylgtv/blob/master/aiopylgtv/endpoints.py |
173-
174-
#### Example
175+
### Service `webostv.button`
176+
177+
| Service data attribute | Optional | Description |
178+
| ---------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
179+
| `entity_id` | no | Target a specific webostv media player. |
180+
| `button` | no | Name of the button. Known possible values are `LEFT`, `RIGHT`, `DOWN`, `UP`, `HOME`, `BACK`, `ENTER`, `DASH`, `INFO`, `ASTERISK`, `CC`, `EXIT`, `MUTE`, `RED`, `GREEN`, `BLUE`, `VOLUMEUP`, `VOLUMEDOWN`, `CHANNELUP`, `CHANNELDOWN`, `0`, `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9` |
181+
182+
### Service `webostv.command`
183+
184+
| Service data attribute | Optional | Description |
185+
| ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
186+
| `entity_id` | no | Target a specific webostv media player. |
187+
| `command` | no | Endpoint for the command, e.g. `media.controls/rewind`. The full list of known endpoints is available at <https://github.com/bendavid/aiopylgtv/blob/master/aiopylgtv/endpoints.py> |
188+
189+
### Example
175190

176191
```yaml
177192
script:

0 commit comments

Comments
 (0)