ESP32-S2 dac - is this a bug?

Hi,
with ESP32 based boards, esp32_dac component works fine. But with I’m getting a bit weird errors with ESP32-S2 boards.

With board lolin_s2_mini and dac output pin GPIO25, i’m getting error - The pin GPIO25 is not usable on ESP32-S2s. That’s correct, since ESP32-S2 can use GPIO17&GPIO18 for dac output only.

But when I update update pin to GPIO17 or GPIO18, compilation fails with Unknown value ‘17’, valid options are ‘25’, ‘26’.

How can I convince esphome to allow me to use dac on ESP32-S2 boards ?

esphome:
  name: dactest
esp32:
  #board: lolin32_lite
  board: lolin_s2_mini
  framework:
    type: arduino

# Enable logging
logger:


output:
  - platform: esp32_dac
    pin: GPIO17
    id: dac_output

image

It seem to be one of those issues.
Worth opening a ticket, I think.

What’s the correct way to deal with this? Should I submit pull request with esp32s2_dac component with updated pins, or is it better to update esp32_dac component ?

ESP-IDF framework

This is an alternative base framework for ESP32 chips, and recommended for variants of the ESP32 like ESP32S2, ESP32S3, ESP32C3 and single-core ESP32 chips.

Switching framework won’t help.
The pins are hardcoded in ESPHome, currently: