Both duty cycle and pulse width on same pin

Hello,

I noticed it is not possible to measure both duty cycle and pulse width on the same pin.
Perhaps the pin configuration overwrites the interrupt call.
Is there a way to get it done?

  - platform: pulse_width
    pin:
      number: D5
      mode: INPUT_PULLUP
    id: pulse_width_
    update_interval: 5s
  - platform: duty_cycle
    pin:
      number: D5
      mode: INPUT_PULLUP
    id: duty_cycle_
    update_interval: 5s

Thanks

Hi honda4life

not 100% sure but maybe this will work, change the name that’s suit you and make them different/unique

  - platform: pulse_width
    pin:
      number: D5
      mode: INPUT_PULLUP
    name: "Pulse Width" #try a name that's suits you
    id: pulse_width_
    update_interval: 5s
  - platform: duty_cycle
    pin:
      number: D5
      mode: INPUT_PULLUP
    name: "Duty Cycle" #try a name that's suits you
    id: duty_cycle_
    update_interval: 5s

Tried that before, I want the sensor internal.