mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
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:
parent
e969d364e6
commit
e7e2f4e786
@ -28,6 +28,7 @@ CONF_ENCODING = "encoding"
|
|||||||
|
|
||||||
DEFAULT_PORT = 4352
|
DEFAULT_PORT = 4352
|
||||||
DEFAULT_ENCODING = "utf-8"
|
DEFAULT_ENCODING = "utf-8"
|
||||||
|
DEFAULT_TIMEOUT = 10
|
||||||
|
|
||||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||||
{
|
{
|
||||||
@ -93,7 +94,9 @@ class PjLinkDevice(MediaPlayerEntity):
|
|||||||
def projector(self):
|
def projector(self):
|
||||||
"""Create PJLink Projector instance."""
|
"""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)
|
projector.authenticate(self._password)
|
||||||
return projector
|
return projector
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user