Panasonic Projector Component

So I used the Acer projector component and modified it to make it work with my Panasonic projector. It was mostly changing the serial commands to work with my projector. I really only use it to turn the pj on and off for now.

However, I have run into an issue where the state continuously flip-flops between Off and unavailable. It seems like Home Assistant is maybe requesting the state too often and the pj simply isn’t responding. Is there a way to adjust the interval of how often Home Assistant checks it’s state?

Also, I am not a programmer by any means so if you see some odd code or unnecessary code please let me know.

My code

Original code