Update Modbus binary sensor docs (#12036)

This commit is contained in:
Vladimír Záhradník 2020-02-11 12:04:33 +01:00 committed by GitHub
parent d20c4dcae9
commit 4bfde7192b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,20 +18,21 @@ To use your Modbus binary sensors in your installation, add the following to you
# Example configuration.yaml entry # Example configuration.yaml entry
binary_sensor: binary_sensor:
- platform: modbus - platform: modbus
coils: inputs:
- name: Sensor1 - name: Sensor1
hub: hub1 hub: hub1
slave: 1 slave: 1
coil: 100 address: 100
- name: Sensor2 - name: Sensor2
hub: hub1 hub: hub1
slave: 1 slave: 1
coil: 110 address: 110
input_type: discrete_input
``` ```
{% configuration %} {% configuration %}
coils: inputs:
description: The array contains a list of coils to read from. description: The array contains a list of coils and discrete inputs to read from.
required: true required: true
type: [map, list] type: [map, list]
keys: keys:
@ -48,10 +49,14 @@ coils:
description: The number of the slave (Optional for TCP and UDP Modbus). description: The number of the slave (Optional for TCP and UDP Modbus).
required: true required: true
type: integer type: integer
coil: address:
description: Coil number. description: Coil or discrete input Modbus address.
required: true required: true
type: integer type: integer
input_type:
description: Modbus input type (coil, discrete_input), default coil.
required: false
type: string
device_class: device_class:
description: The [type/class](/integrations/binary_sensor/#device-class) of the binary sensor to set the icon in the frontend. description: The [type/class](/integrations/binary_sensor/#device-class) of the binary sensor to set the icon in the frontend.
required: false required: false