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

Public Member Functions

None __init__ (self, HomeAssistant hass, str method, str host, int|None port=None)
 
None async_close_remote (self)
 
dict[str, Any]|None async_device_info (self)
 
bool async_is_on (self)
 
None async_power_off (self)
 
None async_request_app_list (self)
 
None async_send_keys (self, list[str] keys)
 
str async_try_connect (self)
 
bool power_off_in_progress (self)
 
None register_app_list_callback (self, Callable[[dict[str, str]], None] func)
 
None register_reauth_callback (self, CALLBACK_TYPE func)
 
None register_update_config_entry_callback (self, Callable[[Mapping[str, Any]], None] func)
 

Static Public Member Functions

SamsungTVBridge get_bridge (HomeAssistant hass, str method, str host, int|None port=None, Mapping[str, Any]|None entry_data=None)
 

Public Attributes

 hass
 
 host
 
 method
 
 port
 

Private Member Functions

None _async_send_power_off (self)
 
None _notify_app_list_callback (self, dict[str, str] app_list)
 
None _notify_reauth_callback (self)
 
None _notify_update_config_entry (self, Mapping[str, Any] updates)
 

Private Attributes

 _app_list_callback
 
 _end_of_power_off
 
 _reauth_callback
 
 _update_config_entry
 

Detailed Description

The Base Bridge abstract class.

Definition at line 140 of file bridge.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.samsungtv.bridge.SamsungTVBridge.__init__ (   self,
HomeAssistant  hass,
str  method,
str  host,
int | None   port = None 
)
Initialize Bridge.

Reimplemented in homeassistant.components.samsungtv.bridge.SamsungTVLegacyBridge.

Definition at line 158 of file bridge.py.

Member Function Documentation

◆ _async_send_power_off()

None homeassistant.components.samsungtv.bridge.SamsungTVBridge._async_send_power_off (   self)
private
Send power off command.

Reimplemented in homeassistant.components.samsungtv.bridge.SamsungTVLegacyBridge.

Definition at line 235 of file bridge.py.

◆ _notify_app_list_callback()

None homeassistant.components.samsungtv.bridge.SamsungTVBridge._notify_app_list_callback (   self,
dict[str, str]  app_list 
)
private
Notify update config callback.

Definition at line 252 of file bridge.py.

◆ _notify_reauth_callback()

None homeassistant.components.samsungtv.bridge.SamsungTVBridge._notify_reauth_callback (   self)
private
Notify access denied callback.

Reimplemented in homeassistant.components.samsungtv.bridge.SamsungTVLegacyBridge.

Definition at line 242 of file bridge.py.

◆ _notify_update_config_entry()

None homeassistant.components.samsungtv.bridge.SamsungTVBridge._notify_update_config_entry (   self,
Mapping[str, Any]  updates 
)
private
Notify update config callback.

Definition at line 247 of file bridge.py.

◆ async_close_remote()

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

Reimplemented in homeassistant.components.samsungtv.bridge.SamsungTVLegacyBridge.

Definition at line 239 of file bridge.py.

◆ async_device_info()

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

Reimplemented in homeassistant.components.samsungtv.bridge.SamsungTVLegacyBridge.

Definition at line 198 of file bridge.py.

◆ async_is_on()

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

Reimplemented in homeassistant.components.samsungtv.bridge.SamsungTVLegacyBridge.

Definition at line 212 of file bridge.py.

◆ async_power_off()

None homeassistant.components.samsungtv.bridge.SamsungTVBridge.async_power_off (   self)
Send power off command to remote and close.

Definition at line 227 of file bridge.py.

◆ async_request_app_list()

None homeassistant.components.samsungtv.bridge.SamsungTVBridge.async_request_app_list (   self)
Request app list.

Definition at line 201 of file bridge.py.

◆ async_send_keys()

None homeassistant.components.samsungtv.bridge.SamsungTVBridge.async_send_keys (   self,
list[str]  keys 
)
Send a list of keys to the tv.

Reimplemented in homeassistant.components.samsungtv.bridge.SamsungTVLegacyBridge.

Definition at line 216 of file bridge.py.

◆ async_try_connect()

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

Reimplemented in homeassistant.components.samsungtv.bridge.SamsungTVLegacyBridge.

Definition at line 194 of file bridge.py.

◆ get_bridge()

SamsungTVBridge homeassistant.components.samsungtv.bridge.SamsungTVBridge.get_bridge ( HomeAssistant  hass,
str  method,
str  host,
int | None   port = None,
Mapping[str, Any] | None   entry_data = None 
)
static
Get Bridge instance.

Definition at line 144 of file bridge.py.

◆ power_off_in_progress()

bool homeassistant.components.samsungtv.bridge.SamsungTVBridge.power_off_in_progress (   self)
Return if power off has been recently requested.

Definition at line 220 of file bridge.py.

◆ register_app_list_callback()

None homeassistant.components.samsungtv.bridge.SamsungTVBridge.register_app_list_callback (   self,
Callable[[dict[str, str]], None]   func 
)
Register app_list callback function.

Definition at line 187 of file bridge.py.

◆ register_reauth_callback()

None homeassistant.components.samsungtv.bridge.SamsungTVBridge.register_reauth_callback (   self,
CALLBACK_TYPE  func 
)
Register a callback function.

Definition at line 177 of file bridge.py.

◆ register_update_config_entry_callback()

None homeassistant.components.samsungtv.bridge.SamsungTVBridge.register_update_config_entry_callback (   self,
Callable[[Mapping[str, Any]], None]   func 
)
Register a callback function.

Definition at line 181 of file bridge.py.

Member Data Documentation

◆ _app_list_callback

homeassistant.components.samsungtv.bridge.SamsungTVBridge._app_list_callback
private

Definition at line 191 of file bridge.py.

◆ _end_of_power_off

homeassistant.components.samsungtv.bridge.SamsungTVBridge._end_of_power_off
private

Definition at line 229 of file bridge.py.

◆ _reauth_callback

homeassistant.components.samsungtv.bridge.SamsungTVBridge._reauth_callback
private

Definition at line 179 of file bridge.py.

◆ _update_config_entry

homeassistant.components.samsungtv.bridge.SamsungTVBridge._update_config_entry
private

Definition at line 185 of file bridge.py.

◆ hass

homeassistant.components.samsungtv.bridge.SamsungTVBridge.hass

Definition at line 162 of file bridge.py.

◆ host

homeassistant.components.samsungtv.bridge.SamsungTVBridge.host

Definition at line 165 of file bridge.py.

◆ method

homeassistant.components.samsungtv.bridge.SamsungTVBridge.method

Definition at line 164 of file bridge.py.

◆ port

homeassistant.components.samsungtv.bridge.SamsungTVBridge.port

Definition at line 163 of file bridge.py.


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