Light&UV Sensor LTR390 reaches the measurement limits Post

The ltr390 sensor, on sunny days, reaches the measurement limits. It actually delivers results that are too high. The sensor shows 157,286 Lx and a count of 1,048,575 which seems excessively high. The gain is set to 1X
The LTR390 is connected to an ESP32 in an ESPHOME environment with the following configuration:

  - platform: ltr390  
    gain: X1
      name: "UV Index"
      accuracy_decimals: 2
        - multiply: 1.20 # Correction for average estimated UV Transmittance loss due to the sapphire crystal used
      id: uvindex
      name: "Counts UV Sensor"
      name: "Light"
      device_class: illuminance
      accuracy_decimals: 2 
      id: lux
      name: " Counts Light Sensor"


Any idea what could be happening to make the readings so much higher than reasonable?
Thank you in advance for any help

try with gain 18X

If I set a gain of X18 the light count still goes to the top (1,048,575) but the lux (which is a calculation from the count) gives a maximum of just over 8000 lux which is also not true. Clearly the sensor is overcounting for some reason and saturating. Really desperate with this issue which is important for the project I am doing.

Did you ever try without esphome? Like Adafruit example code?