mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Avoid query operations on a pjlink powered off projector (#28132)
This commit is contained in:
parent
efae75103a
commit
86700ec1ac
@ -105,10 +105,12 @@ class PjLinkDevice(MediaPlayerDevice):
|
||||
pwstate = projector.get_power()
|
||||
if pwstate in ("on", "warm-up"):
|
||||
self._pwstate = STATE_ON
|
||||
else:
|
||||
self._pwstate = STATE_OFF
|
||||
self._muted = projector.get_mute()[1]
|
||||
self._current_source = format_input_source(*projector.get_input())
|
||||
else:
|
||||
self._pwstate = STATE_OFF
|
||||
self._muted = False
|
||||
self._current_source = None
|
||||
except KeyError as err:
|
||||
if str(err) == "'OK'":
|
||||
self._pwstate = STATE_OFF
|
||||
|
Loading…
x
Reference in New Issue
Block a user