Minimizing of the configuration sample (#1008)
This commit is contained in:
parent
a09ede5b63
commit
de7c1d5ac9
22 changed files with 143 additions and 127 deletions
|
@ -21,25 +21,35 @@ To use your aREST binary sensor in your installation, add the following to your
|
|||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
platform: arest
|
||||
resource: http://IP_ADDRESS
|
||||
name: Office Switch
|
||||
pin: 8
|
||||
- platform: arest
|
||||
resource: http://IP_ADDRESS
|
||||
pin: 8
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **resource** (*Required*): IP address and schema of the device that is exposing an aREST API, e.g. http://192.168.1.10.
|
||||
- **name** (*Optional*): Let you overwrite the the name of the device. By default *name* from the device is used.
|
||||
- **pin** (*Required*): Number of the pin to monitor.
|
||||
- **name** (*Optional*): Let you overwrite the the name of the device. By default *name* from the device is used.
|
||||
|
||||
Accessing the URL http://IP_ADDRESS/digital/PIN_NUMBER should give you the state of the pin inside a JSON response as `return_value`.
|
||||
|
||||
```bash
|
||||
$ curl -X GET http://10.100.0.157/digital/9
|
||||
$ curl -X GET http://192.168.0.5/digital/9
|
||||
{"return_value": 0, "id": "office1", "name": "Office", "connected": true}
|
||||
```
|
||||
|
||||
An example for Pin 9 inspired by the command above could look like this:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
binary_sensor:
|
||||
- platform: arest
|
||||
resource: http://192.168.0.5/digital/9
|
||||
pin: 9
|
||||
name: Office
|
||||
```
|
||||
|
||||
<p class='note'>
|
||||
This sensor is not suitable for fast state changes because there is a high possibility that the change took place between two update cycle.
|
||||
</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue