Repository navigation
Conversation
show_now_playing (now_playing) and show_media_poster (display_tmdb) call POST /api/display/now-playing and /api/display/tmdb. A media_player entity can fill the fields; values given in the call win. The player's picture is sent as the cover (music: tried first, then the engine's lookup) or as the TMDB fallback, made absolute with the internal URL when relative. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…usic and TV Five blueprints under blueprints/automation/smart_frame_engine that call the integration's services. Tests load them with Home Assistant's blueprint models and run them as real automations against the real service schemas. README documents the import links and where each picture comes from. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Milestone 3: two new media services and the automation blueprints promised in
CLAUDE.md. Grounded in the Smart Frame Engine contract v1.2 (openapi.json:NowPlayingRequest,TmdbDisplayRequest); no field is invented.Services (capability-gated, translated
ServiceValidationError, optionalconfig_entry_id, same patterns as M2)show_now_playing(now_playing):POST /api/display/now-playing. Contract fields (artist,album,title,artwork_url,duration_seconds,position_seconds,enrich_artwork,ephemeral,hold_minutes,push_to_fraimic,show_title,style,ttl_seconds), plus amedia_playerentity that fills whatever the call leaves out.show_media_poster(display_tmdb):POST /api/display/tmdb. Contract fields (query,media_type,season,year,language,fallback_url,ephemeral,ttl_minutes,hold_minutes,push_to_fraimic), plusmedia_player.Blueprints (
blueprints/automation/smart_frame_engine/)ambient_weatherset_ambient_contextambient_presenceset_ambient_context(an empty list clears it)title_cardsend_title_card, templatable textsnow_playing_covershow_now_playingtv_postershow_media_posterDecisions worth a look
fallback_url, used only when TMDB has no match).artwork_urlis tried first; the engine's Deezer / MusicBrainz lookup (enrich_artwork) only runs when the cover is missing or unusable. The contract has no "engine first, Home Assistant second" order for covers. The music blueprint has a "Send the player's cover" switch (default on); off makes the engine's lookup the only source.entity_pictureis usually relative (/api/media_player_proxy/...). It is made absolute with Home Assistant's internal URL; if none is configured the picture is simply left out (debug log, no error) and the engine's own lookup applies. The engine has to be able to reach that URL: that is a network matter on the user's side.media_positionplus the time sincemedia_position_updated_at(capped at the track length), so the engine works out the cover's expiry from the real position.to: nullso only real state changes fire. The media blueprints listen tomedia_titleand theplayingtransition, not to position ticks, and count "starts playing with a new title" once.config_entry_id: ""would raiseentry_not_found, so the blueprints drop empty values from the service data and sendconfig_entry_idonly when an engine is picked.ttl_minutesfor posters is 1..1440 (the title card allows 10080); each service enforces its own contract range.Verification
Fresh Linux clone of this branch (Python 3.14, HA 2026.10.4):
ruff check .,ruff format --check .,mypy custom_components(strict): passedpytest: 360 passed, 4 consecutive runs, and each of the 360 tests also passes alone in its own process (360 of 360 reported exactly "1 passed")Not verified: hassfest and HACS run in CI only. Nothing has run against a real engine or a real Home Assistant UI import: all HTTP is mocked from the contract's schemas. The blueprints'
source_urlpoints atmain, so URL import only works once this is merged.Not in this PR
Clearing the cover when music stops (
DELETE /api/queue/ephemeral; the cover already expires with the track), base64 artwork,ttl_minutes: nullfor title cards, Smart Mix, Immich display services, a real-engine test.🤖 Generated with Claude Code