I have a 4 way pwm dimmer module that I can control with HA without issue, but i would like to make the individual parts of the module turn on with rocker switch. I can get the output to toggle with the rocker switch and current code , but the light itself does not toggle in HA, only the binary switch.
I am able to link the physical switch to the binary switch but cant link the physical switch to the lights. Can anyone point me in the right direction as to how i can get this to work properly?
light:
- platform: monochromatic
name: "Light 1"
output: output1
- platform: monochromatic
name: "Light 2"
output: output2
- platform: monochromatic
name: "Light 3"
output: output3
- platform: monochromatic
name: "Light 4"
output: output4
switch:
- platform: restart
name: "Device Restart"
binary_sensor:
- platform: gpio
pin:
number: GPIO16
inverted: true
mode:
input: true
pullup: true
id: switch1
name: "Switch 1"
icon: mdi:switch
on_press:
then:
- output.turn_on: output1
on_release:
then:
- output.turn_off: output1
output:
- platform: ledc
id: output1
pin:
number: GPIO14
inverted: no
- platform: ledc
id: output2
pin:
number: GPIO27
inverted: no
- platform: ledc
id: output3
pin:
number: GPIO26
inverted: no
- platform: ledc
id: output4
pin:
number: GPIO25
inverted: no