bruvv / LILYGO-T-Higrow-Esphome

GNU General Public License v2.0
30 stars 14 forks source link

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

Closed Copyrighter closed 1 month ago

Copyrighter commented 1 month 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 1 month ago

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

Copyrighter commented 1 month ago

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

bruvv commented 1 month ago

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

Copyrighter commented 1 month 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 1 month ago

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