From da502a87dea0060813f833a9657482811198cc6a Mon Sep 17 00:00:00 2001 From: Destix <32171782+Destix@users.noreply.github.com> Date: Tue, 10 Sep 2019 23:35:08 +0300 Subject: [PATCH] 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 --- source/_components/switch.modbus.markdown | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/source/_components/switch.modbus.markdown b/source/_components/switch.modbus.markdown index c4714555baa..f27377d70e7 100644 --- a/source/_components/switch.modbus.markdown +++ b/source/_components/switch.modbus.markdown @@ -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 +```