Log pin state

Please suggest how could I log changes of pin state.
More specifically, I would like to see how zero_cross input and gate output of ac_dimmer component are changed in time.

Hi @alexeyka :wave:

How are you doing?

Here are some tips how to improve your post (pay special attention to include all necessary information).

It is also possible to choose a category for your thread :+1:

Have resolved by adding

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO34
      allow_other_uses: True
    name: "ZC"

Then can see in log

[16:16:26.694][D][binary_sensor:039]: 'ZC': New state is OFF
[16:16:26.706][D][binary_sensor:039]: 'ZC': New state is ON
[16:16:26.733][D][binary_sensor:039]: 'ZC': New state is OFF
[16:16:26.745][D][binary_sensor:039]: 'ZC': New state is ON
[16:16:26.773][D][binary_sensor:039]: 'ZC': New state is OFF
[16:16:26.788][D][binary_sensor:039]: 'ZC': New state is ON
1 Like