1
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:
Stephan Beier 2019-04-11 18:32:25 +02:00 committed by Andrew Sayre
parent d078e50fb8
commit 02347df140

View File

@ -137,11 +137,13 @@ class EpsonProjector(MediaPlayerDevice):
async def async_turn_on(self):
"""Turn on epson."""
from epson_projector.const import 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
if self._state == STATE_ON:
await self._projector.send_command(TURN_OFF)
@property