Check if wash dryer is ready with Tuya smart plug but responds to connection drops

Hope it is the right place to ask.

I’ve got a wash dryer and want to know when it is ready. I have a solution and works:
I check it with a Tuya smart plug when the power drops below 10watt after 1 minut (see picture).

Problem with this is that the connection with Tuya is not stable and drops sometimes. But when the connection comes up the trigger is triggered and I get a notification when the wash dryer is not running at all.
I have to find some way to discard the connection drops but can’t figure it out. Hope someone can help. Thanks.

I think I solved it myself:

  • Added an on/off toggle switch ‘stekker_wasdroger_online’ in helpers
  • Added 2 triggers when device goes ‘unavailable’ and comes ‘online’ and switch helper off/on
  • Extra check in initial trigger of helper switch if it is on/off