Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.androidtv.media_player.ADBDevice Class Reference
Inheritance diagram for homeassistant.components.androidtv.media_player.ADBDevice:
[legend]
Collaboration diagram for homeassistant.components.androidtv.media_player.ADBDevice:
[legend]

Public Member Functions

None __init__ (self, AndroidTVConfigEntry entry)
 
None adb_command (self, str command)
 
None async_added_to_hass (self)
 
tuple[bytes|None, str|Noneasync_get_media_image (self)
 
None async_media_next_track (self)
 
None async_media_pause (self)
 
None async_media_play (self)
 
None async_media_play_pause (self)
 
None async_media_previous_track (self)
 
None async_select_source (self, str source)
 
None async_turn_off (self)
 
None async_turn_on (self)
 
None learn_sendevent (self)
 
None service_download (self, str device_path, str local_path)
 
None service_upload (self, str device_path, str local_path)
 
- Public Member Functions inherited from homeassistant.helpers.entity.Entity
None __init_subclass__ (cls, **Any kwargs)
 
str __repr__ (self)
 
None add_to_platform_abort (self)
 
None add_to_platform_finish (self)
 
None add_to_platform_start (self, HomeAssistant hass, EntityPlatform platform, asyncio.Semaphore|None parallel_updates)
 
bool assumed_state (self)
 
None async_device_update (self, bool warning=True)
 
None async_internal_added_to_hass (self)
 
None async_internal_will_remove_from_hass (self)
 
None async_on_remove (self, CALLBACK_TYPE func)
 
None async_registry_entry_updated (self)
 
None async_remove (self, *bool force_remove=False)
 
None async_removed_from_registry (self)
 
None async_schedule_update_ha_state (self, bool force_refresh=False)
 
None async_set_context (self, Context context)
 
None async_update_ha_state (self, bool force_refresh=False)
 
None async_will_remove_from_hass (self)
 
None async_write_ha_state (self)
 
str|None attribution (self)
 
bool available (self)
 
DeviceInfo|None device_info (self)
 
bool enabled (self)
 
EntityCategory|None entity_category (self)
 
bool entity_registry_enabled_default (self)
 
bool entity_registry_visible_default (self)
 
Mapping[str, Any]|None extra_state_attributes (self)
 
bool force_update (self)
 
HassJobType get_hassjob_type (self, str function_name)
 
er.EntityOptionsType|None get_initial_entity_options (self)
 
bool has_entity_name (self)
 
str|None icon (self)
 
str|UndefinedType|None name (self)
 
None schedule_update_ha_state (self, bool force_refresh=False)
 
bool should_poll (self)
 
str|None suggested_object_id (self)
 
str|None translation_key (self)
 
Mapping[str, strtranslation_placeholders (self)
 
str|None unique_id (self)
 
str|None unit_of_measurement (self)
 
bool use_device_name (self)
 
- Public Member Functions inherited from homeassistant.helpers.entity.CachedProperties
None __init__ (cls, str name, tuple[type,...] bases, dict[Any, Any] namespace, **Any kwargs)
 
Any __new__ (mcs, str name, tuple[type,...] bases, dict[Any, Any] namespace, set[str]|None cached_properties=None, **Any kwargs)
 
- Public Member Functions inherited from homeassistant.components.media_player.MediaPlayerEntity
str access_token (self)
 
str|None app_id (self)
 
str|None app_name (self)
 
BrowseMedia async_browse_media (self, MediaType|str|None media_content_type=None, str|None media_content_id=None)
 
None async_clear_playlist (self)
 
tuple[bytes|None, str|Noneasync_get_browse_image (self, str media_content_type, str media_content_id, str|None media_image_id=None)
 
None async_join_players (self, list[str] group_members)
 
None async_media_seek (self, float position)
 
None async_media_stop (self)
 
None async_mute_volume (self, bool mute)
 
None async_play_media (self, MediaType|str media_type, str media_id, **Any kwargs)
 
None async_select_sound_mode (self, str sound_mode)
 
None async_set_repeat (self, RepeatMode repeat)
 
None async_set_shuffle (self, bool shuffle)
 
None async_set_volume_level (self, float volume)
 
None async_toggle (self)
 
None async_unjoin_player (self)
 
None async_volume_down (self)
 
None async_volume_up (self)
 
dict[str, Any] capability_attributes (self)
 
None clear_playlist (self)
 
MediaPlayerDeviceClass|None device_class (self)
 
str|None entity_picture (self)
 
str get_browse_image_url (self, str media_content_type, str media_content_id, str|None media_image_id=None)
 
list[str]|None group_members (self)
 
bool|None is_volume_muted (self)
 
None join_players (self, list[str] group_members)
 
str|None media_album_artist (self)
 
str|None media_album_name (self)
 
str|None media_artist (self)
 
str|None media_channel (self)
 
str|None media_content_id (self)
 
MediaType|str|None media_content_type (self)
 
int|None media_duration (self)
 
str|None media_episode (self)
 
str|None media_image_hash (self)
 
str|None media_image_local (self)
 
bool media_image_remotely_accessible (self)
 
str|None media_image_url (self)
 
None media_next_track (self)
 
None media_pause (self)
 
None media_play (self)
 
str|None media_playlist (self)
 
int|None media_position (self)
 
dt.datetime|None media_position_updated_at (self)
 
None media_previous_track (self)
 
str|None media_season (self)
 
None media_seek (self, float position)
 
str|None media_series_title (self)
 
None media_stop (self)
 
str|None media_title (self)
 
int|None media_track (self)
 
None mute_volume (self, bool mute)
 
None play_media (self, MediaType|str media_type, str media_id, **Any kwargs)
 
RepeatMode|str|None repeat (self)
 
None select_sound_mode (self, str sound_mode)
 
None select_source (self, str source)
 
None set_repeat (self, RepeatMode repeat)
 
None set_shuffle (self, bool shuffle)
 
None set_volume_level (self, float volume)
 
bool|None shuffle (self)
 
str|None sound_mode (self)
 
list[str]|None sound_mode_list (self)
 
str|None source (self)
 
list[str]|None source_list (self)
 
MediaPlayerState|None state (self)
 
dict[str, Any] state_attributes (self)
 
bool support_clear_playlist (self)
 
bool support_grouping (self)
 
bool support_next_track (self)
 
bool support_pause (self)
 
bool support_play (self)
 
bool support_play_media (self)
 
bool support_previous_track (self)
 
bool support_seek (self)
 
bool support_select_sound_mode (self)
 
bool support_select_source (self)
 
bool support_shuffle_set (self)
 
bool support_stop (self)
 
bool support_volume_mute (self)
 
bool support_volume_set (self)
 
MediaPlayerEntityFeature supported_features (self)
 
MediaPlayerEntityFeature supported_features_compat (self)
 
None turn_off (self)
 
None turn_on (self)
 
None unjoin_player (self)
 
float|None volume_level (self)
 
float volume_step (self)
 

Public Attributes

 turn_off_command
 
 turn_on_command
 
- Public Attributes inherited from homeassistant.components.androidtv.entity.AndroidTVEntity
 aftv
 
 exceptions
 
- Public Attributes inherited from homeassistant.helpers.entity.Entity
 device_entry
 
 entity_id
 
 hass
 
 parallel_updates
 
 platform
 
 registry_entry
 
- Public Attributes inherited from homeassistant.components.media_player.MediaPlayerEntity
 state
 

Private Member Functions

None _adb_get_screencap (self, bool force=False)
 
bytes|None _adb_screencap (self)
 
None _async_get_screencap (self, str|None prev_app_id=None)
 
None _process_config (self)
 

Private Attributes

 _app_id_to_name
 
 _app_name_to_id
 
 _attr_extra_state_attributes
 
 _attr_media_image_hash
 
 _entry_id
 
 _exclude_unnamed_apps
 
 _failed_connect_count
 
 _get_sources
 
 _last_screencap
 
 _media_image
 
 _screencap_delta
 

Static Private Attributes

 _attr_device_class = MediaPlayerDeviceClass.TV
 
 _attr_name = None
 

Additional Inherited Members

- Static Public Attributes inherited from homeassistant.helpers.entity.Entity
 bool
 
 EntityPlatform
 
 HomeAssistant
 
 None
 
 StateInfo
 
 StateType
 
 str
 
- Static Public Attributes inherited from homeassistant.components.media_player.MediaPlayerEntity
 bool
 
 MediaPlayerEntityFeature
 
 None
 

Detailed Description

Representation of an Android or Fire TV device.

Definition at line 107 of file media_player.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.androidtv.media_player.ADBDevice.__init__ (   self,
AndroidTVConfigEntry  entry 
)
Initialize the Android / Fire TV device.

Reimplemented from homeassistant.components.androidtv.entity.AndroidTVEntity.

Definition at line 113 of file media_player.py.

Member Function Documentation

◆ _adb_get_screencap()

None homeassistant.components.androidtv.media_player.ADBDevice._adb_get_screencap (   self,
bool   force = False 
)
private
Take a screen capture from the device every configured minutes.

Definition at line 202 of file media_player.py.

◆ _adb_screencap()

bytes | None homeassistant.components.androidtv.media_player.ADBDevice._adb_screencap (   self)
private
Take a screen capture from the device.

Definition at line 183 of file media_player.py.

◆ _async_get_screencap()

None homeassistant.components.androidtv.media_player.ADBDevice._async_get_screencap (   self,
str | None   prev_app_id = None 
)
private
Take a screen capture from the device when enabled.

Definition at line 187 of file media_player.py.

◆ _process_config()

None homeassistant.components.androidtv.media_player.ADBDevice._process_config (   self)
private
Load the config options.

Definition at line 139 of file media_player.py.

◆ adb_command()

None homeassistant.components.androidtv.media_player.ADBDevice.adb_command (   self,
str  command 
)
Send an ADB command to an Android / Fire TV device.

Definition at line 279 of file media_player.py.

◆ async_added_to_hass()

None homeassistant.components.androidtv.media_player.ADBDevice.async_added_to_hass (   self)
Set config parameter when add to hass.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 170 of file media_player.py.

◆ async_get_media_image()

tuple[bytes | None, str | None] homeassistant.components.androidtv.media_player.ADBDevice.async_get_media_image (   self)
Fetch current playing image.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 219 of file media_player.py.

◆ async_media_next_track()

None homeassistant.components.androidtv.media_player.ADBDevice.async_media_next_track (   self)
Send next track command (results in fast-forward).

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 260 of file media_player.py.

◆ async_media_pause()

None homeassistant.components.androidtv.media_player.ADBDevice.async_media_pause (   self)
Send pause command.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 229 of file media_player.py.

◆ async_media_play()

None homeassistant.components.androidtv.media_player.ADBDevice.async_media_play (   self)
Send play command.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 224 of file media_player.py.

◆ async_media_play_pause()

None homeassistant.components.androidtv.media_player.ADBDevice.async_media_play_pause (   self)
Send play/pause command.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 234 of file media_player.py.

◆ async_media_previous_track()

None homeassistant.components.androidtv.media_player.ADBDevice.async_media_previous_track (   self)
Send previous track command (results in rewind).

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 255 of file media_player.py.

◆ async_select_source()

None homeassistant.components.androidtv.media_player.ADBDevice.async_select_source (   self,
str  source 
)
Select input source.

If the source starts with a '!', then it will close the app instead of
opening it.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 265 of file media_player.py.

◆ async_turn_off()

None homeassistant.components.androidtv.media_player.ADBDevice.async_turn_off (   self)
Turn off the device.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 247 of file media_player.py.

◆ async_turn_on()

None homeassistant.components.androidtv.media_player.ADBDevice.async_turn_on (   self)
Turn on the device.

Reimplemented from homeassistant.components.media_player.MediaPlayerEntity.

Definition at line 239 of file media_player.py.

◆ learn_sendevent()

None homeassistant.components.androidtv.media_player.ADBDevice.learn_sendevent (   self)
Translate a key press on a remote to ADB 'sendevent' commands.

Definition at line 304 of file media_player.py.

◆ service_download()

None homeassistant.components.androidtv.media_player.ADBDevice.service_download (   self,
str  device_path,
str  local_path 
)
Download a file from your Android / Fire TV device to your Home Assistant instance.

Definition at line 323 of file media_player.py.

◆ service_upload()

None homeassistant.components.androidtv.media_player.ADBDevice.service_upload (   self,
str  device_path,
str  local_path 
)
Upload a file from your Home Assistant instance to an Android / Fire TV device.

Definition at line 332 of file media_player.py.

Member Data Documentation

◆ _app_id_to_name

homeassistant.components.androidtv.media_player.ADBDevice._app_id_to_name
private

Definition at line 145 of file media_player.py.

◆ _app_name_to_id

homeassistant.components.androidtv.media_player.ADBDevice._app_name_to_id
private

Definition at line 147 of file media_player.py.

◆ _attr_device_class

homeassistant.components.androidtv.media_player.ADBDevice._attr_device_class = MediaPlayerDeviceClass.TV
staticprivate

Definition at line 110 of file media_player.py.

◆ _attr_extra_state_attributes

homeassistant.components.androidtv.media_player.ADBDevice._attr_extra_state_attributes
private

Definition at line 131 of file media_player.py.

◆ _attr_media_image_hash

homeassistant.components.androidtv.media_player.ADBDevice._attr_media_image_hash
private

Definition at line 119 of file media_player.py.

◆ _attr_name

homeassistant.components.androidtv.media_player.ADBDevice._attr_name = None
staticprivate

Definition at line 111 of file media_player.py.

◆ _entry_id

homeassistant.components.androidtv.media_player.ADBDevice._entry_id
private

Definition at line 116 of file media_player.py.

◆ _exclude_unnamed_apps

homeassistant.components.androidtv.media_player.ADBDevice._exclude_unnamed_apps
private

Definition at line 124 of file media_player.py.

◆ _failed_connect_count

homeassistant.components.androidtv.media_player.ADBDevice._failed_connect_count
private

Definition at line 137 of file media_player.py.

◆ _get_sources

homeassistant.components.androidtv.media_player.ADBDevice._get_sources
private

Definition at line 123 of file media_player.py.

◆ _last_screencap

homeassistant.components.androidtv.media_player.ADBDevice._last_screencap
private

Definition at line 211 of file media_player.py.

◆ _media_image

homeassistant.components.androidtv.media_player.ADBDevice._media_image
private

Definition at line 194 of file media_player.py.

◆ _screencap_delta

homeassistant.components.androidtv.media_player.ADBDevice._screencap_delta
private

Definition at line 164 of file media_player.py.

◆ turn_off_command

homeassistant.components.androidtv.media_player.ADBDevice.turn_off_command

Definition at line 167 of file media_player.py.

◆ turn_on_command

homeassistant.components.androidtv.media_player.ADBDevice.turn_on_command

Definition at line 168 of file media_player.py.


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