mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
Prevent the projector to toogle on/off (#22985)
This commit is contained in:
parent
d078e50fb8
commit
02347df140
@ -137,11 +137,13 @@ class EpsonProjector(MediaPlayerDevice):
|
|||||||
async def async_turn_on(self):
|
async def async_turn_on(self):
|
||||||
"""Turn on epson."""
|
"""Turn on epson."""
|
||||||
from epson_projector.const import TURN_ON
|
from epson_projector.const import TURN_ON
|
||||||
|
if self._state == STATE_OFF:
|
||||||
await self._projector.send_command(TURN_ON)
|
await self._projector.send_command(TURN_ON)
|
||||||
|
|
||||||
async def async_turn_off(self):
|
async def async_turn_off(self):
|
||||||
"""Turn off epson."""
|
"""Turn off epson."""
|
||||||
from epson_projector.const import TURN_OFF
|
from epson_projector.const import TURN_OFF
|
||||||
|
if self._state == STATE_ON:
|
||||||
await self._projector.send_command(TURN_OFF)
|
await self._projector.send_command(TURN_OFF)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user