Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.panasonic_viera.Remote Class Reference

Public Member Functions

None __init__ (self, HomeAssistant hass, str host, int port, Script|None on_action=None, str|None app_id=None, str|None encryption_key=None)
 
None async_create_remote_control (self, bool during_setup=False)
 
dict[str, Any]|None async_get_device_info (self)
 
None async_play_media (self, MediaType media_type, str media_id)
 
None async_send_key (self, Keys|str key)
 
None async_set_mute (self, bool enable)
 
None async_set_volume (self, float volume)
 
None async_turn_off (self)
 
None async_turn_on (self, Context|None context)
 
None async_update (self)
 

Public Attributes

 available
 
 muted
 
 state
 
 volume
 

Private Member Functions

_R|None _Ts (self, Callable[[*_Ts], _R] func, **_Ts args)
 
None _update (self)
 

Private Attributes

 _app_id
 
 _control
 
 _encryption_key
 
 _hass
 
 _host
 
 _on_action
 
 _port
 

Detailed Description

The Remote class. It stores the TV properties and the remote control connection itself.

Definition at line 126 of file __init__.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.panasonic_viera.Remote.__init__ (   self,
HomeAssistant  hass,
str  host,
int  port,
Script | None   on_action = None,
str | None   app_id = None,
str | None   encryption_key = None 
)
Initialize the Remote class.

Definition at line 129 of file __init__.py.

Member Function Documentation

◆ _Ts()

_R | None homeassistant.components.panasonic_viera.Remote._Ts (   self,
Callable[[*_Ts], _R]  func,
**_Ts   args 
)
private
Handle errors from func, set available and reconnect if needed.

Definition at line 246 of file __init__.py.

◆ _update()

None homeassistant.components.panasonic_viera.Remote._update (   self)
private
Retrieve the latest data.

Definition at line 189 of file __init__.py.

◆ async_create_remote_control()

None homeassistant.components.panasonic_viera.Remote.async_create_remote_control (   self,
bool   during_setup = False 
)
Create remote control.

Definition at line 156 of file __init__.py.

◆ async_get_device_info()

dict[str, Any] | None homeassistant.components.panasonic_viera.Remote.async_get_device_info (   self)
Return device info.

Definition at line 238 of file __init__.py.

◆ async_play_media()

None homeassistant.components.panasonic_viera.Remote.async_play_media (   self,
MediaType  media_type,
str  media_id 
)
Play media.

Definition at line 232 of file __init__.py.

◆ async_send_key()

None homeassistant.components.panasonic_viera.Remote.async_send_key (   self,
Keys | str  key 
)
Send a key to the TV and handle exceptions.

Definition at line 195 of file __init__.py.

◆ async_set_mute()

None homeassistant.components.panasonic_viera.Remote.async_set_mute (   self,
bool  enable 
)
Set mute based on 'enable'.

Definition at line 221 of file __init__.py.

◆ async_set_volume()

None homeassistant.components.panasonic_viera.Remote.async_set_volume (   self,
float  volume 
)
Set volume level, range 0..1.

Definition at line 226 of file __init__.py.

◆ async_turn_off()

None homeassistant.components.panasonic_viera.Remote.async_turn_off (   self)
Turn off the TV.

Definition at line 214 of file __init__.py.

◆ async_turn_on()

None homeassistant.components.panasonic_viera.Remote.async_turn_on (   self,
Context | None  context 
)
Turn on the TV.

Definition at line 205 of file __init__.py.

◆ async_update()

None homeassistant.components.panasonic_viera.Remote.async_update (   self)
Update device data.

Definition at line 181 of file __init__.py.

Member Data Documentation

◆ _app_id

homeassistant.components.panasonic_viera.Remote._app_id
private

Definition at line 146 of file __init__.py.

◆ _control

homeassistant.components.panasonic_viera.Remote._control
private

Definition at line 164 of file __init__.py.

◆ _encryption_key

homeassistant.components.panasonic_viera.Remote._encryption_key
private

Definition at line 147 of file __init__.py.

◆ _hass

homeassistant.components.panasonic_viera.Remote._hass
private

Definition at line 139 of file __init__.py.

◆ _host

homeassistant.components.panasonic_viera.Remote._host
private

Definition at line 141 of file __init__.py.

◆ _on_action

homeassistant.components.panasonic_viera.Remote._on_action
private

Definition at line 144 of file __init__.py.

◆ _port

homeassistant.components.panasonic_viera.Remote._port
private

Definition at line 142 of file __init__.py.

◆ available

homeassistant.components.panasonic_viera.Remote.available

Definition at line 174 of file __init__.py.

◆ muted

homeassistant.components.panasonic_viera.Remote.muted

Definition at line 192 of file __init__.py.

◆ state

homeassistant.components.panasonic_viera.Remote.state

Definition at line 173 of file __init__.py.

◆ volume

homeassistant.components.panasonic_viera.Remote.volume

Definition at line 193 of file __init__.py.


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