Update Reference.md

This commit is contained in:
HomeSpan 2021-12-23 22:58:52 -06:00 committed by GitHub
parent 8737efea14
commit 81776f3366
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -262,6 +262,11 @@ The following methods are supported:
* returns a pointer to the Characteristic itself so that the method can be chained during instantiation
* example: `(new Characteristic::MyCustomChar())->setDescription("Tuner Frequency");`
* `SpanCharacteristic *setUnit(const char *unit)`
* adds or overrides the *unit* for a Characteristic, as described in HAP-R2 Table 6-6
* returns a pointer to the Characteristic itself so that the method can be chained during instantiation
* example: `(new Characteristic::RotationSpeed())->setUnit("percentage");`
## *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.