mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Move imports in acer_projector component (#27456)
This commit is contained in:
parent
af4bcf8de6
commit
de4482e8d3
@ -1,6 +1,7 @@
|
|||||||
"""Use serial protocol of Acer projector to obtain state of the projector."""
|
"""Use serial protocol of Acer projector to obtain state of the projector."""
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
|
import serial
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
@ -73,7 +74,6 @@ class AcerSwitch(SwitchDevice):
|
|||||||
|
|
||||||
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."""
|
||||||
import serial
|
|
||||||
|
|
||||||
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 +90,6 @@ class AcerSwitch(SwitchDevice):
|
|||||||
|
|
||||||
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."""
|
||||||
import serial
|
|
||||||
|
|
||||||
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user