IPTV Kodi and light automation advice needed

I could use some advice. I just got an IPTV subscription that uses a Kodi add-on. The problem is that I have an automation that dims the lights when Kodi is playing and brightens when Kodi is paused/stopped, but the live IPTV seems to constantly pause/play (even though the stream continues to play, might be buffering or something) and causes my lights to go up and down constantly.

The only thing I can think of is to put a “Live TV” switch/toggle on the hass front end and add a condition to my lights automation that the “Live TV” toggle must be off, but this kind of reduces the amount of “home automation”.

Maybe you can use a for: statement, and only trigger automations if Kodi it’s been paused/playing for certain amount of time.

Thanks for the suggestion. I did think of that, but if I pause it to get up and get something, I’d rather the lights come on right away than wait for a certain amount of time. The best would be if you could put the specific add-on as a condition but highly doubt that’s possible.