This integration allows you to set YouTube playlists as backgrounds for your Lovelace dashboards/views based on Home Assistant entity states.
- In Home Assistant, go to Settings → Devices & Services → Integrations.
- Click the Explore & Download button in HACS.
- Search for YouTube Background in HACS.
- Click Install.
- Restart Home Assistant.
- Go to Settings → Devices & Services and click Create Integration to add YouTube Background.
- In HACS, click the menu (⋮) in the top right and select Custom repositories.
- Paste this URL:
https://github.com/SolusCado/Background-Playlist - Select Integration as the category.
- Click Create.
- Search for YouTube Background and click Install.
- Restart Home Assistant.
- Go to Settings → Devices & Services and click Create Integration to add YouTube Background.
- Download the repository as a ZIP file from GitHub (or clone it).
- Extract the
youtube_backgroundfolder fromcustom_components/. - Copy it to your Home Assistant
config/custom_components/directory. - Restart Home Assistant.
- Go to Settings → Devices & Services and click Create Integration to add YouTube Background.
An API key is optional, but strongly recommended for enhanced functionality (playlist search, validation, metadata).
Without an API key, you can still paste a playlist ID or URL manually. With an API key, the integration can:
- Search for playlists from the panel
- Validate playlist URLs and IDs
- Show playlist titles, item counts, and estimated durations
- Open the Google Cloud Console.
- Create a new project, or select an existing one.
- Go to APIs & Services → Library.
- Search for YouTube Data API v3 and enable it.
- Go to APIs & Services → Credentials.
- Click Create Credentials → API key.
- Copy the generated API key.
- In Home Assistant, go to Settings → Devices & Services → Integrations.
- Open YouTube Background.
- Click Configure.
- Paste your API key and save.
After installing, open the YouTube Backgrounds panel from the Home Assistant sidebar to manage your mappings.
Each mapping can specify:
- Dashboard path
- Optional view path
- Entity ID to monitor
- Default playlist ID or playlist URL
- State-to-playlist mappings
- Mute, autoplay, shuffle, transition, and debug settings
- Corner fade gradient settings
The Dashboard path is the first segment of the dashboard URL.
Examples:
https://home.example.com/dashboard-television/lounge→ dashboard path isdashboard-televisionhttps://home.example.com/lovelace/0→ dashboard path islovelace
The View path is optional.
- Leave it blank to apply the background to the entire dashboard.
- Set it to a specific view path to apply the background only on that one view.
Examples:
https://home.example.com/dashboard-television/lounge→ view path isloungehttps://home.example.com/dashboard-television/0→ view path can be0
- Create a mapping.
- Choose the target Dashboard path.
- Optionally choose a View path.
- Paste a playlist URL or playlist ID into Default Playlist.
- Click Validate to confirm the playlist.
- Optionally set an Entity ID and add state rules to switch playlists dynamically.
- Save the mapping.
If an entity is configured, the integration will check its current state and try to match it against your state rules.
Example:
- Entity:
input_select.house_mode - State
day→ daytime playlist - State
night→ nighttime playlist - Fallback → default playlist
- The live background player only runs on configured dashboards and views.
- If you navigate to a dashboard or screen without a matching mapping, the player is hidden.
- The preview in the panel is designed to match the live dashboard behavior as closely as possible.
You can trigger playback from automations/scripts using the youtube_background.play service.
Example automation action:
action:
- service: youtube_background.play
data:
dashboard_path: dashboard-television
view_path: lounge
source: automationAll fields are optional:
- If no fields are provided, all active YouTube Background runtimes receive the play request.
dashboard_pathandview_pathcan target a specific dashboard/view.
Pause example:
action:
- service: youtube_background.pause
data:
dashboard_path: dashboard-television
view_path: lounge
source: automationThe same optional targeting fields apply to youtube_background.pause.
- Published a current dated HACS package for the latest integration build.
- Added fresh Desktop Kiosk macOS release assets for universal, Apple Silicon, and Intel builds with matching SHA-256 checksums.
- Added a per-dashboard Max Resolution option in the configuration panel, and updated runtime quality escalation to stop at the lower of:
- highest quality available from YouTube for the current video/client, and
- configured dashboard max resolution cap.
- Disabled background playback while Lovelace dashboard Edit mode is active.
- Prevented direct pointer interaction with the YouTube iframe so incidental on-screen YouTube controls no longer appear.
- Improved playback stability by reducing fallback resume churn and restoring autoplay behavior for Tizen dashboards.
- Updated DEV overlay behavior to auto-fade after 10 seconds.
- Validated and stabilized the gesture interaction fix on touch devices by preventing duplicate pointer/touch handling from being interpreted as a double activation.
- Preserves single tap/click playback start while restoring reliable intentional double-tap/double-click mute toggling.
- Packaged as
2026.04.22brelease artifact for HACS; manifest version remains numeric for Home Assistant compatibility.
- Production republish of
2026.04.22.1using a non-DEV runtime version token so debug overlay logging is disabled in normal installs.
- Restored gesture mute toggling with explicit double-activation detection for both desktop and touch devices.
- Added event de-duplication in gesture handlers so overlapping window/body listeners do not produce false double-tap triggers.
- Improved Bubble Card backdrop compatibility by switching the scroll-lock selector guard to the current body class (
bubble-body-scroll-locked), preventing the integration layering rule from overriding Bubble's modal backdrop behavior. - Added quality diagnostics in the runtime overlay, including requested quality, current
getPlaybackQuality(), and available quality levels snapshots. - Reworked quality upshift behavior to use stepped escalation based on current playback quality and available tiers.
- Replaced interaction-triggered quality requests with a periodic quality escalation poller.
- Updated poller behavior to stop once max available quality is reached, then restart on new
PLAYINGstate transitions (new video/resume).
- Added a Duplicate action on mapping cards so existing mappings can be cloned quickly from the panel.
- Improved random startup behavior so playlist reloads are more reliably varied, including safer handling when playlist metadata is incomplete.
- Added playlist item-count tracking in mapping metadata to support bounded random start index selection when known.
- Improved autoplay compatibility for strict browser environments, including the native Samsung Tizen browser, by deferring startup until a valid playback unlock path is available.
- Added
youtube_background.playandyoutube_background.pauseHome Assistant actions so dashboards can be started or paused from automations and scripts.
- Update
custom_components/youtube_background/frontend/youtube-background-runtime.jsand bumpRUNTIME_LOG_VERSIONon every DEV-share push so the browser banner always shows the current build version. - Preferred: run
python3 scripts/bump_version.py YYYY.MM.DDto update all version points together (manifest.json,hacs.jsonzip filename, andRUNTIME_LOG_VERSION).
For issues, please check the GitHub repository.


