Capacitive moisture sensors with cd74hc4067 multiplexer on esp32c3

I am having issues getting correct readings from my 12 sensors. i am assuming it is something in my lambda or attentuation? i have them reading as percentage and then template sensors for reading raw voltage value for calibration. they are all reading at the same values which are
[D][sensor:094]: 'Plant Moisture 9 Raw Voltage': Sending state 0.00066 V with 2 decimals of accuracy
and
[D][sensor:094]: 'Plant Moisture 8': Sending state 79.52293 % with 2 decimals of accuracy
this is sections of my code

sensor:
  - platform: adc
    pin: GPIO3
    id: adc_sensor
    attenuation: 11db
    update_interval: 60s    
  - platform: cd74hc4067
    id: adc_1
    name: Plant Moisture 1
    number: 0
    sensor: adc_sensor
    accuracy_decimals: 2
    unit_of_measurement: "%"
    device_class: humidity
    icon: "mdi:water-percent"
    filters:
      - lambda: |-
          float moisture_dry_soil_value= 3.0000;
          float moisture_wet_soil_value =  0.25488;
          if (x >  moisture_dry_soil_value ) {
            return 0;
          } else if (x < moisture_wet_soil_value) {
            return 100;
          } else {
            return (moisture_dry_soil_value - x) / (moisture_dry_soil_value - moisture_wet_soil_value ) * 100.0;
          }
  - platform: cd74hc4067
    id: adc_2
    name: Plant Moisture 2

    ############# Continue for other 11 sensors #############

      - platform: template
    name: "Plant Moisture 1 Raw Voltage"
    lambda: |-
      float voltage = id(adc_sensor).raw_state / 4095.0 * 3.3;
      return voltage;
    unit_of_measurement: "V"
    accuracy_decimals: 2
  - platform: template
    name: "Plant Moisture 2 Raw Voltage"
    lambda: |-
      float voltage = id(adc_sensor).raw_state / 4095.0 * 3.3;

    ############# Continue for other 11 sensors #############

globals:
  - id: current_channel
    type: int
    restore_value: no
    initial_value: '0'
  - id: sensor_1_value
    type: float
    restore_value: no
    initial_value: '0.0'    
  - id: sensor_2_value
    type: float
    restore_value: no

    ############# Continue for other 11 sensors #############    

cd74hc4067:
  id: cd74hc4067_hub
  pin_s0: GPIO18
  pin_s1: GPIO19
  pin_s2: GPIO20
  pin_s3: GPIO21

any help would be greatly appreciated!

Have you confirmed this is an adc pin for your board (and checked it’s special functions)?

Do they change at all with the glass of water / air test?

ok i got the moisture percent sensors working by changing to gpio4. but the template raw voltage sensors havent changed still acting like they are not connected. the sensors do change resistance when they are dry or wet.

Personally I would set them up a bit more like this.

 #Voltage divider: Used 2 x 300K Ohm resistors
  - platform: adc
    id: batt_voltage
    name: Battery Voltage 
    internal: true
    pin: ${batt_voltage_pin} #ADC1
    update_interval: never
    accuracy_decimals: 2
    attenuation: auto
    filters:
      # #Scale it back up from voltage divided value 2 x 300K > 2.1. 4.2/2.1 = 2.
      - multiply: 2
 
      
#Intermediate sensor. Might consolidate them later.
  - platform: copy
    source_id: batt_voltage
    id: batt_voltage_filtered
    icon: "mdi:battery"
    internal: false
    name:  Battery Voltage Smoothed
    unit_of_measurement: V
    accuracy_decimals: 2
    filters:
      - median: #Use moving median to smooth noise.
          window_size: 10
          send_every: 10
          send_first_at: 10
       
# Convert the Voltage to a battery  level (%)
  - platform: copy
    source_id: batt_voltage_filtered
    id: batt_level
    internal: false 
    icon: "mdi:battery"
    name: Battery Percent
    unit_of_measurement: '%'
    accuracy_decimals: 0
    filters:
      # Map from voltage to Battery level
      - calibrate_linear:
          - 3.1 -> 0    # Set 3.0 to 0% even though it can go lower (2.4V), for life extention. There's not much capacity below this anyway.
          - 4.1 -> 100  # Set 4.05 to 100% even though it can go higher (~4.2V), for life extention.
       
      #Overide values less than 0% and more than 100%
      - lambda: |
          if (x < 0) return 0; 
          else if (x > 100) return 100;
          else return ceil(x / 5) * 5;

Shouldn’t that ^^^

Be more like this?

  - platform: template
    name: "Plant Moisture 2 Raw Voltage"
    lambda: |-
      float voltage = id(adc_2).raw_state / 4095.0 * 3.3;