Set default pjlink timeout (#36781)

* make pjlink timeout configurable

* fix format

* remove timeout configuration and use a default value instead
This commit is contained in:
Benoit Louy
2020-06-14 14:23:59 -04:00
committed by GitHub
parent e969d364e6
commit e7e2f4e786

View File

@@ -28,6 +28,7 @@ CONF_ENCODING = "encoding"
DEFAULT_PORT = 4352
DEFAULT_ENCODING = "utf-8"
DEFAULT_TIMEOUT = 10
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
{
@@ -93,7 +94,9 @@ class PjLinkDevice(MediaPlayerEntity):
def projector(self):
"""Create PJLink Projector instance."""
projector = Projector.from_address(self._host, self._port, self._encoding)
projector = Projector.from_address(
self._host, self._port, self._encoding, DEFAULT_TIMEOUT
)
projector.authenticate(self._password)
return projector