Prevent the projector to toogle on/off (#22985)

This commit is contained in:
Stephan Beier authored and Andrew Sayre committed 2019-04-11 11:32:25 -05:00
1 parent d078e50fb8
commit 02347df140
1 file changed
+4 -2
@@ -137,12 +137,14 @@ class EpsonProjector(MediaPlayerDevice):
async def async_turn_on(self):
"""Turn on epson."""
from epson_projector.const import TURN_ON
await self._projector.send_command(TURN_ON)
if self._state == STATE_OFF:
await self._projector.send_command(TURN_ON)
async def async_turn_off(self):
"""Turn off epson."""
from epson_projector.const import TURN_OFF
await self._projector.send_command(TURN_OFF)
if self._state == STATE_ON:
await self._projector.send_command(TURN_OFF)
@property
def source_list(self):