Pulse Width Sensor

The pulse_width sensor allows you to measure how long a given digital signal is HIGH. For example this can be used to measure PWM signals to transmit some value over a simple protocol. The unit of measurement for this sensor is seconds.

Note

This component is intended for measurements in the microsecond to seconds range! The largest period this component can measure is just over 70 minutes.

# Example configuration entry
sensor:
  - platform: pulse_width
    pin: D0
    name: Pulse Width Sensor

Configuration variables:

  • pin (Optional, Pin Schema): The pin to observe for the pulse width.

  • update_interval (Optional, Time): The interval to check the sensor. Defaults to 60s.

  • id (Optional, ID): Set the ID of this sensor for use in lambdas.

  • All other options from Sensor.

See Also