Gauge is not refreshed

Hi
I am new with Nextion . I want to display a gauge on the screen. I use ESPHome .
It works but each time there is a new value, the needle moves as it should move but the previous needle position is kept on the screen.
After some time the screen is full of needles
Any way to refresh the screen before sending a new value to the gauge ?
Thanks
Phil

The command I use is:


id(esp_nextion).set_component_value("electricite.gauge_kwh_j",id(linky_puissance_jour).state/15000*180);

Try sending a ‘doevents’ after your command. Instruction Set - Nextion

Hi thank you
How to send this command from Esphome ?
Thanks
Phil