bruvv / LILYGO-T-Higrow-Esphome

GNU General Public License v2.0
33 stars 15 forks source link

View Both Sensors in battery.yaml: # Batterie volt and # Battery %. #24

Closed Copyrighter closed 5 months ago

Copyrighter commented 5 months ago

How can I have both Sensors enabled in battery.yaml: # Batterie volt and # Battery %.? If I add both of them, I see following error: Pin 33 is used in multiple places. Each one separately is working.

bruvv commented 5 months ago

fixed https://github.com/bruvv/LILYGO-T-Higrow-Esphome/commit/5fe36fa56ec550fb31f84db49eec0bc1607d725e

Copyrighter commented 5 months ago

@bruvv is there any other solution than escaping? is there option to see both % and V?

bruvv commented 5 months ago

not that I know of. Mine broke so I cannot test it at the moment :(

Copyrighter commented 5 months ago

@bruvv

I found a working fix ( tested ). change syntax in both sensors to:

sensor:
  # Battery volt
  - platform: adc
    pin:
      number: 33
      allow_other_uses: true

  # Battery %
  - platform: adc
    pin:
      number: 33
      allow_other_uses: true
bruvv commented 5 months ago

nice found! I added it to the repo :) https://github.com/bruvv/LILYGO-T-Higrow-Esphome/commit/12eb9d130cfbb90c3b57126f4ae77ef5dccd2d35