Fix pjlink issue (#20510)
Fix pjlink issue (#20510)

* Fix issue #16606

Some projectors do not respond to pjlink requests during a short period after the status changes or when its in standby, resulting in pypjlink2 throwing an error. This fix catches these errors. Furthermore, only the status 'on' and 'warm-up' is interpreted as switched on, because 'cooling' is actually a switched off status.

* Update pjlink.py

Improved error handling

* Update pjlink.py

Improved error handling

* Update pjlink.py

Clean up

GenericStudent/home-assistant,nugget/home-assistant,PetePriority/home-assistant,tboyce1/home-assistant,tchellomello/home-assistant,sdague/home-assistant,postlund/home-assistant,DavidLP/home-assistant,aronsky/home-assistant,nugget/home-assistant,toddeye/home-assistant,w1ll1am23/home-assistant,jawilson/home-assistant,jnewland/home-assistant,robbiet480/home-assistant,titilambert/home-assistant,postlund/home-assistant,soldag/home-assistant,jamespcole/home-assistant,molobrakos/home-assistant,sdague/home-assistant,Danielhiversen/home-assistant,nugget/home-assistant,mKeRix/home-assistant,adrienbrault/home-assistant,DavidLP/home-assistant,tboyce021/home-assistant,leppa/home-assistant,qedi-r/home-assistant,partofthething/home-assistant,adrienbrault/home-assistant,lukas-hetzenecker/home-assistant,auduny/home-assistant,sander76/home-assistant,sander76/home-assistant,MartinHjelmare/home-assistant,mezz64/home-assistant,toddeye/home-assistant,partofthething/home-assistant,fbradyirl/home-assistant,Teagan42/home-assistant,mKeRix/home-assistant,soldag/home-assistant,Teagan42/home-assistant,Cinntax/home-assistant,auduny/home-assistant,FreekingDean/home-assistant,tboyce1/home-assistant,joopert/home-assistant,Cinntax/home-assistant,qedi-r/home-assistant,kennedyshead/home-assistant,nkgilley/home-assistant,jabesq/home-assistant,nkgilley/home-assistant,jnewland/home-assistant,balloob/home-assistant,pschmitt/home-assistant,balloob/home-assistant,aequitas/home-assistant,home-assistant/home-assistant,Danielhiversen/home-assistant,robbiet480/home-assistant,jawilson/home-assistant,fbradyirl/home-assistant,tboyce1/home-assistant,pschmitt/home-assistant,home-assistant/home-assistant,jnewland/home-assistant,turbokongen/home-assistant,titilambert/home-assistant,fbradyirl/home-assistant,mezz64/home-assistant,molobrakos/home-assistant,jabesq/home-assistant,HydrelioxGitHub/home-assistant,HydrelioxGitHub/home-assistant,w1ll1am23/home-assistant,tboyce1/home-assistant,GenericStudent/home-assistant,turbokongen/home-assistant,jabesq/home-assistant,kennedyshead/home-assistant,jamespcole/home-assistant,HydrelioxGitHub/home-assistant,aequitas/home-assistant,mKeRix/home-assistant,leppa/home-assistant,joopert/home-assistant,aequitas/home-assistant,PetePriority/home-assistant,MartinHjelmare/home-assistant,auduny/home-assistant,rohitranjan1991/home-assistant,lukas-hetzenecker/home-assistant,MartinHjelmare/home-assistant,mKeRix/home-assistant,aronsky/home-assistant,rohitranjan1991/home-assistant,tboyce021/home-assistant,DavidLP/home-assistant,rohitranjan1991/home-assistant,PetePriority/home-assistant,jamespcole/home-assistant,tchellomello/home-assistant,balloob/home-assistant,molobrakos/home-assistant,FreekingDean/home-assistant