Ok, here is my issue. Tried everything I can think of and time to come to the experts. I am using espHome on a Tessan Dimmer, there are a bunch of little lights/buttons etc but the main controls are a switch that physically turns the device on and off on pin 16 and a PWM output that controls the lights dim level on pin 13.
Here is the relevant portion of my configuration that shows these:
switch:
- platform: gpio
pin: 16
name: ${upper_devicename}
id: relay1
restore_mode: ALWAYS_OFF
inverted: True
on_turn_on:
- light.turn_on:
id: light
on_turn_off:
- light.turn_off:
id: light
light:
- platform: monochromatic
name: ${devicename}_light
id: light
output: lightPWM
output:
- platform: esp8266_pwm
id: lightPWM
pin: 13
When I pull these devices into home assistant (or use the built in web server) the switch turns the device on and off as expected and the slider on the light works as expected as well. The problem is with the light toggle. If the toggle is “Off” then the light is at its lowest dim instead of being off and if the light toggle is “On” then the light is at whatever dim level is set (ie the correct functionality).
Am I missing something here? Is the light toggle supposed to turn the light off or just put its lowest dim level? I am thinking this may be a hardware issue (the light is just set up as separate parts, dim level/on-off toggle). If this is the case is there any way to set the switch to turn on/off when the light is toggled, a trigger similar to the switch one (as an example: light.on_turn_on/light.on_turn_off).
Thanks in advance, I really hope I am not missing something silly!