Update TVServices.md
This commit is contained in:
parent
f4b788839f
commit
cd9da777a5
|
|
@ -52,7 +52,7 @@ All of this is accomplished by using a combination of some, or all, of the follo
|
|||
|
||||
* `Characteristic::Identifier()` - this numerical Characteristic sets an ID for each Input Source. Any unsigned 32-bit number can be used as an ID, provided it is *unique* and not used by any other Input Source in the same TV Service. When you use the Input Source Selector in the Home App to choose a particular Input Soure, the `Characteristic::ActiveIdentifier()` from the Television Service (see above) will be updated with a value that matches the ID corresponding to the chosen Input Source. Within HomeSpan you simply use the `update()` method to determine when `Characteristic::ActiveIdentifer()` is updated, and, based on its value, which Input Source was chosen. HomeKit does not seem to require `Characteristic::Identifier()` be defined for an Input Source. However, if it not set, the Home App will not allow it to be displayed as a choice in the Input Source Selector, which defeats the purpose of creating an Input Source!
|
||||
|
||||
* `Characteristic::IsConfigured()` - this Characteristic determines where an Input Source appears in the Home App. Allowed values are 0 and 1. IsConfigured() is optional - if not defined, the Input Source will appear in the Input Source Selector (provided it has an Identifier), but *not* in the list of Input Sources found on the Setting page. This means you will not be able to rename the Input Source from the Home App, nor turn off its visibility in the Input Selector. If IsConfigured() is defined and set to 1, the Input Source appears in both the Input Source Selector List as well as the list of Input Sources on the Setting page. If instead IsConfigured is defined but set to 0, the Input Source will appear in the Settings page, but it will be excluded from the Input Source Selector under all circumstances
|
||||
* `Characteristic::IsConfigured()` - this Characteristic determines whether an Input Source is allowed to appear as a choice in the Input Source Selector of the Home App. If IsConfigured() is defined and set to 0, the Input Source will appear in the Settings page, but it will be excluded as a choice from the Input Source Selector. If IsConfigured() is defined and set to 1, he Input Source will appear in the Settings page, and will be included as a choice in the Input Source Selector. If `Characteristic::IsConfigured()` is not defined at all for an Input Source, that source will appear as a choice in the Input Source Selector, but will *not* appear in the list of Input Sources found on the Settings page. This means you will not be able to rename the Input Source from the Home App, nor toggle it as an allowable choice in the Input Selector (see below)
|
||||
|
||||
* `Characteristic::CurrentVisibilityState()` and `Characteristic::TargetVisibilityState()` - these two Characteristics work in tandem much like any current-state/target-state pair. When these are defined for an Input Source, a checkbox toggle appears next to the name of the Input Source on the Setting page (proivided IsConfigured() has also been defined). Clicking the checkbox causes the Home App to toggle the TargetVisibilityState between 0 to 1, where 0 means the checkbox is *checked*, and 1 means it is *unchecked* (the reverse of what you might expect). If you read this update in HomeSpan you can then use `setVal()` to change the CurrentVisibiltyState() to match the TargetVisibilityState(). Setting CurrentVisibilityState() to 0 means the Input Source appears in the Input Source Selector. Setting CurrentVisibilityState() to 1 means it does not appear as a selection. Note these features only operate if an ID has been set for the Input Source with `Characteristic::Identifier()`, and IsConfigures is set to 1.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue