ESPHome sensors and misbehaving battery level icons

I have an ESPHome sensor set exactly as the docs show in the picture at the bottom of this post but my icon does not represent the battery level.

image
I have tried customize

homeassistant:
  customize:
    sensor.hall_battery_level:
      device_class: battery

but because ESPHome adds an icon attribute it overrides the device_class.

Any ideas anyone on how to rectify this or is it some kind of error in ESPHome?


ESPHome docs implying that it should work

Think you need to remove the icon line, can you show your esphome config ?

Yes, that’s the point I don’t have one.

  - platform: xiaomi_cgg1
    mac_address: xx:xx:xx:xx:xx:xx
    temperature:
      name: "Hall Temperature"
    humidity:
      name: "Hall Humidity"
    battery_level:
      name: "Hall Battery Level"