ESPHome unable light.turn_on: lamp_2

Tags: #<Tag:0x00007f739992af18>

Hello Masters, I’ve basic configuration for turn on/off lights with hardware buttons but it doesn’t works. Of course logs show suitable action but nothings happened… Could somebody look at code??

binary_sensor:
 - platform: gpio
   id: GPIO14
   pin:
      number: GPIO14
      mode: INPUT
      inverted: True
   on_click:
    then:
     - light.turn_on: lamp_2

output:
  - platform: ledc
    pin: GPIO2
    frequency: 4000 Hz
    id: lamp2
    

light:
  - platform: monochromatic
    output: lamp2
    id: lamp_2
    name: "ppokoj_sufit_top"
    


Your logs?

About this button, light and output only this:

[23:50:49][D][binary_sensor:036]: 'GPIO14': Sending state OFF
[23:50:49][D][binary_sensor:036]: 'GPIO14': Sending state ON

Well, it works on_press: instead on_click: - it’s normal???

   on_press:
      then:
      - light.toggle: 
         id: lamp_2