How do i fix measurement '%' which is not a valid unit for the device class ('voltage') in Esphome

hi so i working on my next error issue… its been there for a while… but id like to make it proper so it doesnt throw an error

in Esphome my configuration is

sensor:
  - platform: adc
    pin: GPIO36 #a0
    name: "Smoke Detector #3"
    update_interval: 1s
    filters:
      - multiply: 100
    unit_of_measurement: "%"
    icon: "mdi:percent"

now i figured it out as the % is the error for voltage… but thats how the code was from the project i did it from… how can i make it convert to % i guess but a way its not going to throw an error… some kind of conversion template?

You should be able to set the device to a class that uses “%” such as “battery”…

sensor:
  - platform: adc
    pin: GPIO36 #a0
    name: "Smoke Detector #3"
    update_interval: 1s
    filters:
      - multiply: 100
    device_class: battery
    unit_of_measurement: "%"
    icon: "mdi:percent"

ok great that fixed that problem… my error lists going down but then new ones seem to pop up lol… but its least not as big as it was…

thank you