Correct config for IR Transmitter remote with sensor for status (humidifier transformation)?


I have an dumb humidifier with IR remote. So I have next to humidifier board an wemos d1 mini with ir transmitter for the basic functions (on/off - speed (lo/hi) - ionisier). All the commands works but obviously I need to get the status of my device in the homeassistant interface. So my idea was to use the ADC sensor on a low voltage pin on the humidifier. To be more clear I will put the values next…
ON (HIGH SPEED) - more than 0.2V (usually 0.4)
ON (LOW SPEED) - 0.00 V
OFF - 0.01 V (in general 0.00967)
The values are not fixed they vary +/-

My issue is that I have managed to get status on a second template switch from the values of the ADC but only for ON HIGHSPEED, when is ON LOW my template switch is OFF but the device is working. I don’t know how to treat this scenario in a correct manner. For example I can’t get the status of the fan from the odd voltage measurements. Also this sencod switch bypass is no good for the homekit interface because i have allready 2 switches (one is the status and the second one is the actual command).

I don’t know how well I have explained the configuration and environment… long story short: wemos d1 mini with esphome and ir transmitter + adc values -> homeassistant with the 3 commands for the ir and another template switch for the status -> not getting all the readings because of lack of programming -> hopping that i can get rid of the template switches for status and get correct status on the actual switches (ir commands).

Any help? Any ideas, or examples for me to move further in the problem?

PS: code used in the adc esphome below:

  - platform: adc
      - multiply: 3.3
    pin: A0
    name: "VCC"
    id: VCC
    update_interval: 5s
      below: 0.10
        - switch.template.publish:
            id: power
            state: OFF
        - if:
              lambda: 'return id(VCC).state > 0.05;'
              - switch.template.publish:
                  id: "power"
                  state: ON

Thank you!