mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 09:17:06 +00:00
Modbus switch register support (#3978)
* Update switch.modbus.markdown * Style fix
This commit is contained in:
parent
4881ec195b
commit
8dad2f30b7
@ -14,7 +14,7 @@ ha_iot_class: "Local Push"
|
||||
---
|
||||
|
||||
|
||||
The `modbus` switch platform allows you to control [Modbus](http://www.modbus.org/) coils.
|
||||
The `modbus` switch platform allows you to control [Modbus](http://www.modbus.org/) coils or registers.
|
||||
|
||||
To use your Modbus switches in your installation, add the following to your `configuration.yaml` file:
|
||||
|
||||
@ -30,11 +30,28 @@ switch:
|
||||
- name: Switch2
|
||||
slave: 2
|
||||
coil: 14
|
||||
registers:
|
||||
- name: Register1
|
||||
slave: 1
|
||||
register: 11
|
||||
command_on: 1
|
||||
command_off: 0
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **coils** (*Optional*): A list of relevant coils to read from/write to
|
||||
- **coils** (*Optional*): A list of relevant coils to read from/write to.
|
||||
- **slave** (*Required*): The number of the slave (can be omitted for tcp and udp Modbus).
|
||||
- **name** (*Required*): Name of the sensor
|
||||
- **coil** (*Required*): Coil number
|
||||
- **name** (*Required*): Name of the switch.
|
||||
- **coil** (*Required*): Coil number.
|
||||
- **registers** (*Optional*): A list of relevant registers to read from/write to.
|
||||
- **slave** (*Required*): The number of the slave (can be omitted for tcp and udp Modbus).
|
||||
- **name** (*Required*): Name of the switch.
|
||||
- **register** (*Required*): Register number.
|
||||
- **command_on** (*Required*): Value to write to turn on the switch.
|
||||
- **command_off** (*Required*): Value to write to turn off the switch.
|
||||
- **verify_state** (*Optional*): Define if is possible to readback the status of the switch. (default: True)
|
||||
- **verify_register** (*Optional*): Register to readback. (default: same as register)
|
||||
- **register_type** (*Optional*): Modbus register type: holding or input. (default: holding)
|
||||
- **state_on** (*Optional*): Register value when switch is on. (default: same as command_on)
|
||||
- **state_off** (*Optional*): Register value when switch is off. (default: same as command_off)
|
||||
|
Loading…
x
Reference in New Issue
Block a user