How to avoid overheating of an ESPHome flashed Shelly 2.5?

I need to flash ESPHome to a Shelly 2.5(*). I know it is supported and there are articles about using Tasmota as an intermediate firmware.

One of the points mentioned is the need to set GPIO16 to avoid overheating. The problem is that in the ESPHome documentation above this is done via

sensor:
  - platform: ade7953_i2c
    irq_pin: GPIO16 # Prevent overheating by setting this
    voltage:

and elsewhere via

binary_sensor:
  - platform: gpio
    pin: GPIO16
    name: "ade7953 IRQ pin"
    internal: true

Which one is the correct one? (both address GPIO16)


(*) it used to work well with the native integration (as the other ones I have) but now drops off the network after 1-2 hours (following a reboot). It may be malfunctioning but I want to give it a chance with ESPHome.

I don’t know but personally I would follow the docs

I maybe the binary sensor based approach was a workaround until the feature was implemented or something like that.

Setting irq as suggested in original instructions causes pin to become input anyway, so first (original) solution is ok, since second one just sets gpio16 to become input to prevent short ciruit, as i understand.
To drop temperature even further it’s a good idea to set power save mode (in wifi component) to “light”.