Merge branch 'current' into beta

This commit is contained in:
Jesse Hills 2022-01-17 12:39:57 +13:00
commit 578648355c
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A

View File

@ -249,3 +249,29 @@ can be used:
Creating a POST request to ``/cover/front_window_blinds/set?position=0.1&tilt=0.3`` will
start moving the blinds towards an almost completely closed position and a new tilt
angle.
Select
******
Selects can be set to an option and will return their current option. For example sending
a GET request to ``/select/house_mode`` could yield this payload:
.. code-block:: json
{
"id": "select-house_mode",
"state": "party",
"value": "party"
}
POST requests on the other hand allow setting the select, the available
method is ``set``. The following parameter can be used:
- **option**: The string option to set it to. Must be a valid option.
For example POST ``/select/house_mode/set?option=guest`` will set the select to ``guest``.
Button
******
A button can be ``pressed`` from the REST API by sending a POST request to ``button/do_something/press``.