Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.samsungtv.bridge Namespace Reference

Classes

class  SamsungTVBridge
 
class  SamsungTVEncryptedBridge
 
class  SamsungTVLegacyBridge
 
class  SamsungTVWSBaseBridge
 
class  SamsungTVWSBridge
 

Functions

None __init__ (self, HomeAssistant hass, str method, str host, int|None port=None)
 
_RemoteT|None _async_get_remote (self)
 
_RemoteT|None _async_get_remote_under_lock (self)
 
None _async_send_commands (self, list[_CommandT] commands)
 
None async_close_remote (self)
 
tuple[str, int|None, str|None, dict[str, Any]|None] async_get_device_info (HomeAssistant hass, str host)
 
bool async_is_on (self)
 
str|None mac_from_device_info (dict[str, Any] info)
 
bool model_requires_encryption (str|None model)
 

Variables

 _remote
 
 _remote_lock
 
dictionary ENCRYPTED_MODEL_USES_POWER = {"JU6400", "JU641D"}
 
dictionary ENCRYPTED_MODEL_USES_POWER_OFF = {"H6400", "H6410"}
 
float KEY_PRESS_TIMEOUT = 1.2
 
tuple REST_EXCEPTIONS = (HttpApiError, AsyncioTimeoutError, ResponseError)
 
 SCAN_INTERVAL_PLUS_OFF_TIME
 

Detailed Description

samsungctl and samsungtvws bridge classes.

Function Documentation

◆ __init__()

None homeassistant.components.samsungtv.bridge.__init__ (   self,
HomeAssistant  hass,
str  method,
str  host,
int | None   port = None 
)
The Bridge for WebSocket TVs (v1/v2).
Initialize Bridge.

Definition at line 406 of file bridge.py.

◆ _async_get_remote()

_RemoteT | None homeassistant.components.samsungtv.bridge._async_get_remote (   self)
private
Create or return a remote control instance.

Definition at line 446 of file bridge.py.

◆ _async_get_remote_under_lock()

_RemoteT | None homeassistant.components.samsungtv.bridge._async_get_remote_under_lock (   self)
private
Create or return a remote control instance.

Definition at line 458 of file bridge.py.

◆ _async_send_commands()

None homeassistant.components.samsungtv.bridge._async_send_commands (   self,
list[_CommandT]  commands 
)
private
Send the commands using websocket protocol.

Definition at line 425 of file bridge.py.

◆ async_close_remote()

None homeassistant.components.samsungtv.bridge.async_close_remote (   self)
Close remote object.

Definition at line 461 of file bridge.py.

◆ async_get_device_info()

tuple[str, int | None, str | None, dict[str, Any] | None] homeassistant.components.samsungtv.bridge.async_get_device_info ( HomeAssistant  hass,
str  host 
)
Fetch the port, method, and device info.

Definition at line 101 of file bridge.py.

◆ async_is_on()

bool homeassistant.components.samsungtv.bridge.async_is_on (   self)
Tells if the TV is on.

Definition at line 418 of file bridge.py.

◆ mac_from_device_info()

str | None homeassistant.components.samsungtv.bridge.mac_from_device_info ( dict[str, Any]  info)
Extract the mac address from the device info.

Definition at line 89 of file bridge.py.

◆ model_requires_encryption()

bool homeassistant.components.samsungtv.bridge.model_requires_encryption ( str | None  model)
H and J models need pairing with PIN.

Definition at line 96 of file bridge.py.

Variable Documentation

◆ _remote

homeassistant.components.samsungtv.bridge._remote
private

Definition at line 441 of file bridge.py.

◆ _remote_lock

homeassistant.components.samsungtv.bridge._remote_lock
private

Definition at line 416 of file bridge.py.

◆ ENCRYPTED_MODEL_USES_POWER

dictionary homeassistant.components.samsungtv.bridge.ENCRYPTED_MODEL_USES_POWER = {"JU6400", "JU641D"}

Definition at line 84 of file bridge.py.

◆ ENCRYPTED_MODEL_USES_POWER_OFF

dictionary homeassistant.components.samsungtv.bridge.ENCRYPTED_MODEL_USES_POWER_OFF = {"H6400", "H6410"}

Definition at line 83 of file bridge.py.

◆ KEY_PRESS_TIMEOUT

float homeassistant.components.samsungtv.bridge.KEY_PRESS_TIMEOUT = 1.2

Definition at line 81 of file bridge.py.

◆ REST_EXCEPTIONS

tuple homeassistant.components.samsungtv.bridge.REST_EXCEPTIONS = (HttpApiError, AsyncioTimeoutError, ResponseError)

Definition at line 86 of file bridge.py.

◆ SCAN_INTERVAL_PLUS_OFF_TIME

homeassistant.components.samsungtv.bridge.SCAN_INTERVAL_PLUS_OFF_TIME
Initial value:
1 = entity_component.DEFAULT_SCAN_INTERVAL + timedelta(
2  seconds=5
3 )

Definition at line 77 of file bridge.py.