Hi,
I have a Carlo Gavazzi SH2WEB24 and with ShTool I can use the Modbus integration to Home Assistant. I got a light which is dimmable with the following commands:
0: Turns off the light
1: Turns on the light
2: Change the dimming to 20%
3: Change the dimming to 40%
4: Change the dimming to 80%
9: Change the dimming to 100%
So with the code under I get 5 entities with which I can control the dimming. However I would like to use a slider to change between the commands. I think I should use “modbus.write_register” somehow, but I don’t understand how. Any tips?
- name: "Kontor - Taklys"
address: 1182
slave: 1
write_type: holding
scan_interval: 1
command_on: 1
command_off: 0
verify:
input_type: holding
address: 1182
- name: "Kontor - Taklys2"
address: 1182
slave: 1
write_type: holding
scan_interval: 1
command_on: 2
command_off: 0
verify:
input_type: holding
address: 1182
- name: "Kontor - Taklys3"
address: 1182
slave: 1
write_type: holding
scan_interval: 1
command_on: 3
command_off: 0
verify:
input_type: holding
address: 1182
- name: "Kontor - Taklys4"
address: 1182
slave: 1
write_type: holding
scan_interval: 1
command_on: 4
command_off: 0
verify:
input_type: holding
address: 1182
- name: "Kontor - Taklys5"
address: 1182
slave: 1
write_type: holding
scan_interval: 1
command_on: 9
command_off: 0
verify:
input_type: holding
address: 1182