Corrected example and scan interval info (#10316)

* Corrected example and scan interval info

slave: 1 option in platform configuration causes an error on 0.98.2 
added scan_interval: info
also it seems to me ha_iot_class: should be Local Pull because Modbus all about Pull data from slaves by master

* Update switch.modbus.markdown
This commit is contained in:
Destix 2019-09-10 23:35:08 +03:00 committed by Franck Nijhof
parent a9bf183035
commit da502a87de

View File

@ -18,7 +18,6 @@ To use your Modbus switches in your installation, add the following to your `con
# Example configuration.yaml entry
switch:
platform: modbus
slave: 1
coils:
- name: Switch1
hub: hub1
@ -115,3 +114,24 @@ register:
default: same as command_off
type: integer
{% endconfiguration %}
It's possible to change the default 30 seconds scan interval for the switch state updates as shown in the [Platform options](/docs/configuration/platform_options/#scan-interval) documentation.
### Full example
Example a temperature sensor with a 10 seconds scan interval:
```yaml
switch:
platform: modbus
scan_interval: 10
coils:
- name: Switch1
hub: hub1
slave: 1
coil: 13
- name: Switch2
hub: hub1
slave: 2
coil: 14
```