A tiny Home Assistant custom integration that scrobbles tracks from selected media_player entities to Last.fm.
- Authenticates once during setup and stores the Last.fm session key.
- Lets you enable/disable scrobbling per media player (integration options).
- Tracks playback sessions per player.
- Sends one
track.updateNowPlayingper session after a short debounce. - Sends one
track.scrobblewhen playback reaches scrobble threshold. - Emits HA event
lastfm_scrobble_statusfornow_playing,scrobble,skip,fail, andduplicate_blocked.
Copy custom_components/hal_f into your Home Assistant config custom_components directory and restart HA.
Add integration: Hal.f
Required:
- API Key
- API Secret
- Last.fm Username
- Last.fm Password (used only at setup to fetch session key)
Then open integration options and select enabled media_player entities.
- Duplicate guards:
- in-session
scrobble_sent - short-term dedupe cache keyed by player + track identity
- in-session
- Fallback scrobble threshold is used when duration is missing.