diff --git a/docs/Reference.md b/docs/Reference.md index 51e6742..0c85f02 100644 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -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 * 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)* Creating an instance of this **class** attaches a pushbutton handler to the ESP32 *pin* specified.