modbus:
- name: Waveshare_01
type: tcp
host: 192.168.20.211 # Replace with your device's IP address
port: 502 # Replace with your device's port
switches:
- name: "Waveshare Relay 1-1"
address: 0
slave: 1
write_type: coil
unique_id: modbus_01_relay_1
- name: "Waveshare Relay 1-2"
address: 1
slave: 1
write_type: coil
unique_id: modbus_01_relay_2
- name: "Waveshare Relay 1-3"
address: 2
slave: 1
write_type: coil
unique_id: modbus_01_relay_3
- name: "Waveshare Relay 1-4"
address: 3
slave: 1
write_type: coil
unique_id: modbus_01_relay_4
- name: "Waveshare Relay 1-5"
address: 4
slave: 1
write_type: coil
unique_id: modbus_01_relay_5
- name: "Waveshare Relay 1-6"
address: 5
slave: 1
write_type: coil
unique_id: modbus_01_relay_6
- name: "Waveshare Relay 1-7"
address: 6
slave: 1
write_type: coil
unique_id: modbus_01_relay_7
- name: "Waveshare Relay 1-8"
address: 7
slave: 1
write_type: coil
unique_id: modbus_01_relay_8
- name: Waveshare_02
type: tcp
host: 192.168.20.212
port: 502
switches:
- name: "Waveshare Relay 2-1"
address: 1
slave: 1
write_type: coil
unique_id: modbus_02_relay_1
- name: "Waveshare Relay 2-2"
address: 2
slave: 1
write_type: coil
unique_id: modbus_02_relay_2
- name: "Waveshare Relay 2-3"
address: 3
slave: 1
write_type: coil
unique_id: modbus_02_relay_3
- name: "Waveshare Relay 2-4"
address: 4
slave: 1
write_type: coil
unique_id: modbus_02_relay_4
- name: "Waveshare Relay 2-5"
address: 5
slave: 1
write_type: coil
unique_id: modbus_02_relay_5
- name: "Waveshare Relay 2-6"
address: 6
slave: 1
write_type: coil
unique_id: modbus_02_relay_6
- name: "Waveshare Relay 2-7"
address: 7
slave: 1
write_type: coil
unique_id: modbus_02_relay_7
- name: "Waveshare Relay 2-8"
address: 8
slave: 1
write_type: coil
unique_id: modbus_02_relay_8
binary_sensors:
- name: "Waveshare Input 2-1"
slave: 1
address: 0
input_type: discrete_input
scan_interval: 1 # Update every 1 second
unique_id: modbus_02_input_1
- name: "Waveshare Input 2-2"
slave: 1
address: 1
input_type: discrete_input
scan_interval: 1 # Update every 1 second
unique_id: modbus_02_input_2
- name: "Waveshare Input 2-3"
slave: 1
address: 2
input_type: discrete_input
scan_interval: 1 # Update every 1 second
unique_id: modbus_02_input_3
- name: "Waveshare Input 2-4"
slave: 1
address: 3
input_type: discrete_input
scan_interval: 1 # Update every 1 second
unique_id: modbus_02_input_4
- name: "Waveshare Input 2-5"
slave: 1
address: 4
input_type: discrete_input
scan_interval: 1 # Update every 1 second
unique_id: modbus_02_input_5
- name: "Waveshare Input 2-6"
slave: 1
address: 5
input_type: discrete_input
scan_interval: 1 # Update every 1 second
unique_id: modbus_02_input_6
- name: "Waveshare Input 2-7"
slave: 1
address: 6
input_type: discrete_input
scan_interval: 1 # Update every 1 second
unique_id: modbus_02_input_7
- name: "Waveshare Input 2-8"
slave: 1
address: 7
input_type: discrete_input
scan_interval: 1 # Update every 1 second
unique_id: modbus_02_input_8
So friendly name shows up, but not unique_id, it’s like binary.sensor_digital_input_01.
This is in configuration.yml. Inputs, etc work, just the entity ID doesn’t show correctly, HA assigned it as binary_sensor.digital_input_1
Thanks (Switches, sensors work)