mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Clean up acer_projector constants (#46880)
This commit is contained in:
parent
29c0696537
commit
8330940996
@ -9,6 +9,7 @@ from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchEntity
|
|||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONF_FILENAME,
|
CONF_FILENAME,
|
||||||
CONF_NAME,
|
CONF_NAME,
|
||||||
|
CONF_TIMEOUT,
|
||||||
STATE_OFF,
|
STATE_OFF,
|
||||||
STATE_ON,
|
STATE_ON,
|
||||||
STATE_UNKNOWN,
|
STATE_UNKNOWN,
|
||||||
@ -17,7 +18,6 @@ import homeassistant.helpers.config_validation as cv
|
|||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
CONF_TIMEOUT = "timeout"
|
|
||||||
CONF_WRITE_TIMEOUT = "write_timeout"
|
CONF_WRITE_TIMEOUT = "write_timeout"
|
||||||
|
|
||||||
DEFAULT_NAME = "Acer Projector"
|
DEFAULT_NAME = "Acer Projector"
|
||||||
@ -74,7 +74,6 @@ class AcerSwitch(SwitchEntity):
|
|||||||
|
|
||||||
def __init__(self, serial_port, name, timeout, write_timeout, **kwargs):
|
def __init__(self, serial_port, name, timeout, write_timeout, **kwargs):
|
||||||
"""Init of the Acer projector."""
|
"""Init of the Acer projector."""
|
||||||
|
|
||||||
self.ser = serial.Serial(
|
self.ser = serial.Serial(
|
||||||
port=serial_port, timeout=timeout, write_timeout=write_timeout, **kwargs
|
port=serial_port, timeout=timeout, write_timeout=write_timeout, **kwargs
|
||||||
)
|
)
|
||||||
@ -90,7 +89,6 @@ class AcerSwitch(SwitchEntity):
|
|||||||
|
|
||||||
def _write_read(self, msg):
|
def _write_read(self, msg):
|
||||||
"""Write to the projector and read the return."""
|
"""Write to the projector and read the return."""
|
||||||
|
|
||||||
ret = ""
|
ret = ""
|
||||||
# Sometimes the projector won't answer for no reason or the projector
|
# Sometimes the projector won't answer for no reason or the projector
|
||||||
# was disconnected during runtime.
|
# was disconnected during runtime.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user