mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 09:17:53 +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_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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user