Update Reference.md
This commit is contained in:
parent
946819f3d4
commit
3d6bc0d095
|
|
@ -217,6 +217,14 @@ The following methods are supported:
|
||||||
* returns a pointer to the Characteristic itself so that the method can be chained during instantiation
|
* returns a pointer to the Characteristic itself so that the method can be chained during instantiation
|
||||||
* example: `(new Characteristic::Brightness(50))->setRange(10,100,5);`
|
* example: `(new Characteristic::Brightness(50))->setRange(10,100,5);`
|
||||||
|
|
||||||
|
* `SpanCharacteristic *setValidValues(int n, [int v1, int v2 ...])`
|
||||||
|
* overrides the default HAP Valid Values for Characteristics that have specific enumerated Valid Values with a variable-length list of *n* values *v1*, *v2*, etc.
|
||||||
|
* an error is thrown if:
|
||||||
|
* called on a Characteristic that does not have specific enumerated Valid Values, or
|
||||||
|
* called more than once on the same Characteristic
|
||||||
|
* returns a pointer to the Characteristic itself so that the method can be chained during instantiation
|
||||||
|
* example: `(new Characteristic::SecuritySystemTargetState())->setValidValues(3,0,1,3);` creates a new valid value list of length=3 containing the values 0, 1, and 3. This has the effect of informing the HomeKit that a SecuritySystemTargetState value of 2 (Night Arm) is not valid and should not be shown as a choice in the Home App
|
||||||
|
|
||||||
## *SpanButton(int pin, uint16_t longTime, uint16_t singleTime, uint16_t doubleTime)*
|
## *SpanButton(int pin, uint16_t longTime, uint16_t singleTime, uint16_t doubleTime)*
|
||||||
|
|
||||||
Creating an instance of this **class** attaches a pushbutton handler to the ESP32 *pin* specified.
|
Creating an instance of this **class** attaches a pushbutton handler to the ESP32 *pin* specified.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue