Best way to configure a push button

Hi All,

I have a Shelly 1 running in parallel over a push button. Press once fire LEDS turn on, press the same button again fire LEDS go off. The Shelly operates then, .2 of a second later it turns the output off.

Because of this home assistant doesn’t know if the fire is on or off. Is there a way to configure a automation maybe with a counter using odd triggers as on and even triggers as off?

Any other suggestions would really be appreciated.

Apologise if this doesn’t make complete sense my English isn’t the best.

Thank you

Kris