Update TVServices.md
This commit is contained in:
parent
336ec18545
commit
9b8f4d2b26
|
|
@ -42,11 +42,11 @@ More advanced control of a TV can enabled with two other optional Characteristic
|
|||
|
||||
Use `Service::InputSource()` to create a new input source selection for the TV, such as HDMI-1, HDMI-2, Netflix, etc. The use of `Service::InputSource()` is optional - it is perfectly okay to create a Television Service without the ability to select different Input Sources. However, if used, each Input Source Service added should be defined in the *same* Accessory as the Television Service to which it applies, and ***must*** be linked to that Television Service using `addLink()`. The Home App behaves unexpectedly if it finds any Input Source Services that are not linked to a Television Service.
|
||||
|
||||
Input Sources can appear in two places within the Home App. The first is in the Input Source "Selector" that appears below the On/Off power button when you open the controls for a TV (i.e. long-press the Accessory Tile). This is how you change the Input Source for thge TV. The second place Input Sources appear is on the Settings page for a TV Accessory. This list is used to (a) change the name of each source, and (b) toggle the source so that it either appears or does not appear in the Input Source Selector.
|
||||
Input Sources can appear in two places within the Home App. The first is in the Input Source "Selector" that is shown below the On/Off power button when you open the controls for a TV (i.e. long-press the Accessory Tile). This is how you change the Input Source for the TV. The second place that Input Sources appear is on the Settings page for a TV Accessory. This is where you can change the name of an Input Source, as well as configure whether to include or exclude a particular Input Source from the Input Source Selector.
|
||||
|
||||
The idea is that your sketch should implement a TV Accessory containing a full list of all potential inputs, using names that match the labels on the TV, such as "HDMI 1", "Component 1", "HDMI 2", etc. If your TV Remote has dedicated buttons for Netflix, HBO Max, Amazon Prime, etc. you can add these to the list as well. Once this generic list is created, you can then rename and enable these source directly from within the Home App. For example you might rename "HDMI 1" to "Comcast Cable", and "HDMI 2" to "Sony Blue-Ray". If you have nothing connected to the "Component 1" input source your can exclude it from the Input Source Selector. This makes it easy to configure and re-configure your TV Input Sources without ever having to change or update your HomeSpan sketch.
|
||||
The overall idea is that your sketch should implement a TV Accessory containing a full list of all potential inputs, using names that match the labels on the TV, such as "HDMI 1", "Component 1", "HDMI 2", etc. If your TV Remote has dedicated buttons for Netflix, HBO Max, Amazon Prime, etc. you can add these to the list as well. Once this generic list is created, you can then rename and enable each Input Source directly from within the Home App. For example you might rename "HDMI 1" to "Comcast Cable", and "HDMI 2" to "Sony Blue-Ray". If you have nothing connected to the "Component 1", you can exclude it from the Input Source Selector. This makes it easy to configure and re-configure your TV Input Sources without ever having to change or update your HomeSpan sketch.
|
||||
|
||||
All of this is accomplished by using a combination of some, or all, of the following Characteristics that are supported by `Service::InputSource()`:
|
||||
All of this is accomplished by using a combination of some, or all, of the following Characteristics:
|
||||
|
||||
* `Characteristic::ConfiguredName()` - similar to how its used when applied to `Service::Television`, this Characteristic allows you set the default name for an Input Source. Note that if you change the name of an Input Source in the Home App, an update will be sent to HomeSpan with the new name for you to use if needed. This is very different from the usual `Characteristic::Name()` used for many other Services, and for which name changes performed in the Home App are never communicated back to the Accessory.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue