improve formatting

This commit is contained in:
raman325 2021-07-07 00:21:38 -04:00
parent 2cef84ae81
commit 565a8efc11
No known key found for this signature in database
GPG Key ID: E5FA2EFBCAB83CB7

View File

@ -32,15 +32,13 @@ Supported features constants are combined using the bitwise or (`|`) operator.
### Turn on ### Turn on
There are three optional input parameters that can be passed into the service call: There are three optional input parameters that can be passed into the service call, each gated by a supported feature flag. If the corresponding flag isn't set when a given input parameter is provided in the service call, it will be filtered out from the service call by the base platform before being passed to the integration.
- `tone`: `vol.Any(vol.Coerce(int), cv.string)`
- `duration`: `cv.positive_int`
- `volume_level`: `cv.small_float`
Each input parameter is gated by a supported feature flag. If the corresponding flag isn't set when a given input parameter is provided in the service call, it will be filtered out from the service call by the base platform before being passed to the integration. The input parameter to supported feature flag is as follows: | Parameter Name | Data Validation | Supported Feature Flag |
- `tone`: `SUPPORT_TONES` |---------------- |--------------------------------------- |------------------------ |
- `duration`: `SUPPORT_DURATIONS` | `tone` | `vol.Any(vol.Coerce(int), cv.string)` | `SUPPORT_TONES` |
- `volume_level`: `SUPPORT_VOLUME_SET` | `duration` | `cv.positive_int` | `SUPPORT_DURATIONS` |
| `volume_level` | `cv.small_float` | `SUPPORT_VOLUME_SET` |
```python ```python
class MySirenEntity(SirenEntity): class MySirenEntity(SirenEntity):