mirror of
https://github.com/home-assistant/core
synced 2024-10-07 10:13:38 +02:00
Prevent the projector to toogle on/off (#22985)
This commit is contained in:
parent
d078e50fb8
commit
02347df140
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user