modbus switch platform allows you to control Modbus coils or registers.
To use your Modbus switches in your installation, add the following to your
# Example configuration.yaml entry switch: platform: modbus coils: - name: Switch1 hub: hub1 slave: 1 coil: 13 - name: Switch2 slave: 2 coil: 14 registers: - name: Register1 hub: hub1 slave: 1 register: 11 command_on: 1 command_off: 0
A list of relevant coils to read from/write to.
A list of relevant registers to read from/write to.
Define if is possible to readback the status of the switch.
It’s possible to change the default 30 seconds scan interval for the switch state updates as shown in the Platform options documentation.
Example switches, for which the state is polled from Modbus every 10 seconds.
switch: platform: modbus scan_interval: 10 coils: - name: Switch1 hub: hub1 slave: 1 coil: 13 - name: Switch2 hub: hub1 slave: 2 coil: 14