Yaml Help - declaring two sensors of same platform

I’m not sure why i’m struggling so much with this but how do I declare two different pulse sensors? The value for the first one just shows as ‘zero’. I’ve tried duplicating the working one with a different name with the second also showing zero so what am I missing?

sensor:
  - platform: pulse_meter
    name: 'Pulse Count'
    accuracy_decimals: 0
    pin: ${pulse_pin}

  - platform: pulse_meter    
    name: '${friendly_name} - Power consumption'
    unit_of_measurement: 'W'
    state_class: measurement
    device_class: power
    icon: mdi:flash-outline
    accuracy_decimals: 0
    pin: ${pulse_pin}
    on_value:
      then:
        - light.turn_on:
            id: led_blue
            flash_length: 100ms
        - delay: 0.1s
        - light.turn_off:
            id: led_blue

I suspect they need different pins. Try feeding your pulse signal to two different pins.

1 Like

Ah that’s surprising but at least an explanation thank you.

It was an educated guess :slight_smile: I reckon each platform instance needs exclusive access to a pin. For all platforms that use a pin, not just the pulse_meter.