Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.google_photos.media_source.GooglePhotosMediaSource Class Reference
Inheritance diagram for homeassistant.components.google_photos.media_source.GooglePhotosMediaSource:
[legend]
Collaboration diagram for homeassistant.components.google_photos.media_source.GooglePhotosMediaSource:
[legend]

Public Member Functions

None __init__ (self, HomeAssistant hass)
 
BrowseMediaSource async_browse_media (self, MediaSourceItem item)
 
PlayMedia async_resolve_media (self, MediaSourceItem item)
 

Public Attributes

 hass
 

Static Public Attributes

string name = "Google Photos"
 

Private Member Functions

list[GooglePhotosConfigEntry] _async_config_entries (self)
 
GooglePhotosConfigEntry _async_config_entry (self, str config_entry_id)
 

Detailed Description

Provide Google Photos as media sources.

Definition at line 104 of file media_source.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.google_photos.media_source.GooglePhotosMediaSource.__init__ (   self,
HomeAssistant  hass 
)
Initialize Google Photos source.

Definition at line 109 of file media_source.py.

Member Function Documentation

◆ _async_config_entries()

list[GooglePhotosConfigEntry] homeassistant.components.google_photos.media_source.GooglePhotosMediaSource._async_config_entries (   self)
private
Return all config entries that support photo library reads.

Definition at line 214 of file media_source.py.

◆ _async_config_entry()

GooglePhotosConfigEntry homeassistant.components.google_photos.media_source.GooglePhotosMediaSource._async_config_entry (   self,
str  config_entry_id 
)
private
Return a config entry with the specified id.

Definition at line 223 of file media_source.py.

◆ async_browse_media()

BrowseMediaSource homeassistant.components.google_photos.media_source.GooglePhotosMediaSource.async_browse_media (   self,
MediaSourceItem  item 
)
Return details about the media source.

This renders the multi-level album structure for an account, its albums,
or the contents of an album. This will return a BrowseMediaSource with a
single level of children at the next level of the hierarchy.

Definition at line 144 of file media_source.py.

◆ async_resolve_media()

PlayMedia homeassistant.components.google_photos.media_source.GooglePhotosMediaSource.async_resolve_media (   self,
MediaSourceItem  item 
)
Resolve media identifier to a url.

This will resolve a specific media item to a url for the full photo or video contents.

Definition at line 114 of file media_source.py.

Member Data Documentation

◆ hass

homeassistant.components.google_photos.media_source.GooglePhotosMediaSource.hass

Definition at line 112 of file media_source.py.

◆ name

string homeassistant.components.google_photos.media_source.GooglePhotosMediaSource.name = "Google Photos"
static

Definition at line 107 of file media_source.py.


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