Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.samsungtv.bridge.SamsungTVWSBridge Class Reference
Inheritance diagram for homeassistant.components.samsungtv.bridge.SamsungTVWSBridge:
[legend]
Collaboration diagram for homeassistant.components.samsungtv.bridge.SamsungTVWSBridge:
[legend]

Public Member Functions

None __init__ (self, HomeAssistant hass, str method, str host, int|None port=None, Mapping[str, Any]|None entry_data=None)
 
dict[str, Any]|None async_device_info (self, bool force=False)
 
bool async_is_on (self)
 
None async_launch_app (self, str app_id)
 
None async_request_app_list (self)
 
None async_send_keys (self, list[str] keys)
 
str async_try_connect (self)
 

Public Attributes

 auth_failed
 
 token
 

Private Member Functions

SamsungTVWSAsyncRemote|None _async_get_remote_under_lock (self)
 
None _async_send_power_off (self)
 
Any|None _get_device_spec (self, str key)
 
None _remote_event (self, str event, Any response)
 

Private Attributes

 _device_info
 
 _remote
 

Detailed Description

The Bridge for WebSocket TVs (v2).

Definition at line 472 of file bridge.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.samsungtv.bridge.SamsungTVWSBridge.__init__ (   self,
HomeAssistant  hass,
str  method,
str  host,
int | None   port = None,
Mapping[str, Any] | None   entry_data = None 
)
Initialize Bridge.

Definition at line 477 of file bridge.py.

Member Function Documentation

◆ _async_get_remote_under_lock()

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

Definition at line 596 of file bridge.py.

◆ _async_send_power_off()

None homeassistant.components.samsungtv.bridge.SamsungTVWSBridge._async_send_power_off (   self)
private
Send power off command to remote.

Definition at line 687 of file bridge.py.

◆ _get_device_spec()

Any | None homeassistant.components.samsungtv.bridge.SamsungTVWSBridge._get_device_spec (   self,
str  key 
)
private
Check if a flag exists in latest device info.

Definition at line 492 of file bridge.py.

◆ _remote_event()

None homeassistant.components.samsungtv.bridge.SamsungTVWSBridge._remote_event (   self,
str  event,
Any  response 
)
private
Received event from remote websocket.

Definition at line 654 of file bridge.py.

◆ async_device_info()

dict[str, Any] | None homeassistant.components.samsungtv.bridge.SamsungTVWSBridge.async_device_info (   self,
bool   force = False 
)
Try to gather infos of this TV.

Definition at line 565 of file bridge.py.

◆ async_is_on()

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

Definition at line 498 of file bridge.py.

◆ async_launch_app()

None homeassistant.components.samsungtv.bridge.SamsungTVWSBridge.async_launch_app (   self,
str  app_id 
)
Send the launch_app command using websocket protocol.

Definition at line 584 of file bridge.py.

◆ async_request_app_list()

None homeassistant.components.samsungtv.bridge.SamsungTVWSBridge.async_request_app_list (   self)
Get installed app list.

Definition at line 588 of file bridge.py.

◆ async_send_keys()

None homeassistant.components.samsungtv.bridge.SamsungTVWSBridge.async_send_keys (   self,
list[str]  keys 
)
Send a list of keys using websocket protocol.

Definition at line 592 of file bridge.py.

◆ async_try_connect()

str homeassistant.components.samsungtv.bridge.SamsungTVWSBridge.async_try_connect (   self)
Try to connect to the Websocket TV.

Definition at line 511 of file bridge.py.

Member Data Documentation

◆ _device_info

homeassistant.components.samsungtv.bridge.SamsungTVWSBridge._device_info
private

Definition at line 579 of file bridge.py.

◆ _remote

homeassistant.components.samsungtv.bridge.SamsungTVWSBridge._remote
private

Definition at line 602 of file bridge.py.

◆ auth_failed

homeassistant.components.samsungtv.bridge.SamsungTVWSBridge.auth_failed

Definition at line 617 of file bridge.py.

◆ token

homeassistant.components.samsungtv.bridge.SamsungTVWSBridge.token

Definition at line 488 of file bridge.py.


The documentation for this class was generated from the following file: