Modbus Sensor: Clarify how to use scan_interval (#3578)

* Clarify how to use scan_interval

Many forum posts and issues ask how to change the scan_interval for modbus sensor.
This patch clarify the configuration parameters.

* Fix typos and add example

* There are more options
This commit is contained in:
ziotibia81 2017-10-10 14:08:30 +02:00 committed by Fabian Affolter
parent d3ba5fdfcc
commit 544f90d5de

View File

@ -56,3 +56,27 @@ Configuration variables:
- **offset** (*Optional*): Final offset (output = scale * value + offset), default 0
- **precision** (*Optional*): Number of valid decimals, default 0
- **data_type** (*Optional*): Response representation (int, float). If float selected, value will be converted to IEEE 754 floating point format. default int
It's possible to change the default 30 seconds scan interval for the sensor updates as shown in the [Platform options](/docs/configuration/platform_options/#scan-interval) documentation.
### {% linkable_title Full example %}
Example a tmeperature sensor with a 10 seconds scan interval:
```yaml
sensor:
- platform: modbus
scan_interval: 5
registers:
- name: Room_1
slave: 10
register: 0
register_type: holding
update_interval: 2.5
unit_of_measurement: °C
count: 1
scale: 0.1
offset: 0
precision: 1
data_type: int
```