Monitoring Battery ESP32-E

Added to the new configuration, the values are displayed correctly in the logs. How to display this value in the main panel?

sensor:
  - platform: adc
    pin: 34
    attenuation: 11db
    name: "battery_voltage"
    id: "battery_voltage"
    update_interval: 60s
    filters:
      multiply: 2.0

  - platform: template
    name: "Battery Percentage"
    device_class: "battery"
    id: "battery_percentage"
    accuracy_decimals: 1
    update_interval: 60s
    unit_of_measurement: '%'
    lambda: |-
      return ((id(battery_voltage).state - 3.5) / 0.7 * 100.00);
    filters:
      - lambda: |-
          if (x < 0) return 0; 
          else if (x > 100) return 100;
          else return (x);

[02:03:24][D][sensor:127]: ‘Battery Percentage’: Sending state 66.28571 % with 1 decimals of accuracy

Which main panel? Anything attached to the esphome node or do you want it show in the HA (lovelace) dashboard? :thinking:

Yes, HA (lovelace)

Well, you add entities from esphome nodes like every other entity - noting special here. :man_shrugging:

To start, go to the Home Assistant Overview page, click on the three dots at the top right of the screen and select ‘Edit Dashboard’. Then click on the blue ‘+ Add Card’ icon at the bottom right and select a card to add.