Update hdmi_cec.markdown

This commit is contained in:
Petr Vraník 2016-12-22 11:11:32 +01:00 committed by GitHub
parent 16e6b2eacb
commit 092e0e8962

View File

@ -13,7 +13,7 @@ ha_release: 0.23
ha_iot_class: "Local Push" ha_iot_class: "Local Push"
--- ---
The CEC component provides services that allow selecting the active device, powering on all devices, and setting all devices to standby. Devices are defined in the configuration file by associating HDMI port number and a device name. Connected devices that provide further HDMI ports, such as Soundbars and AVRs are also supported. Devices are listed from the perspective of the CEC-enabled Home Assistant device. Any connected device can be listed, regardless of whether it supports CEC. Ideally the HDMI port number on your device will map correctly the CEC physical address. If it does not, use `cec-client` (part of the `libcec` package) to listen to traffic on the CEC bus and discover the correct numbers. The HDMI CEC component provides services that allow selecting the active device, powering on all devices, setting all devices to standby and creates switch entites for HDMI devices. Devices are defined in the configuration file by associating HDMI port number and a device name. Connected devices that provide further HDMI ports, such as Soundbars and AVRs are also supported. Devices are listed from the perspective of the CEC-enabled Home Assistant device. Any connected device can be listed, regardless of whether it supports CEC. Ideally the HDMI port number on your device will map correctly the CEC physical address. If it does not, use `cec-client` (part of the `libcec` package) to listen to traffic on the CEC bus and discover the correct numbers.
## {% linkable_title CEC Setup %} ## {% linkable_title CEC Setup %}
@ -81,25 +81,32 @@ In the following example, a Pi Zero running Home Assistant is on a TV's HDMI por
```yaml ```yaml
hdmi_cec: hdmi_cec:
devices: devices:
1: Pi Zero TV: 0.0.0.0
2: Pi Zero: 1.0.0.0
1: Fire TV Stick Fire TV Stick: 2.1.0.0
2: Chromecast Chromecast: 2.2.0.0
3: Another Device Another Device: 2.3.0.0
3: BlueRay player BlueRay player: 3.0.0.0
``` ```
## {% linkable_title Services %} ## {% linkable_title Services %}
### {% linkable_title Select Device %} ### {% linkable_title Select Device %}
Call the `hdmi_cec/select_device` service with the name of the device to select, for example: Call the `hdmi_cec/select_device` service with the name of the device from config or entity_id or prysical address"to select it, for example:
```json ```json
{ {"device": "Chromecast"}
"device": "Chromecast"
}
``` ```
```json
{"device": "switch.hdmi_3"}
```
```json
{"device": "1.1.0.0"}
```
So an Automation action using the example above would look something like this. So an Automation action using the example above would look something like this.
```yaml ```yaml