Last.fm
The Last.fm integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] lets you monitor the listening activity of Last.fm users. It creates a sensor for each user you add, showing whether they are currently scrobbling and what they are listening to.
Prerequisites
- A Last.fm account.
- A Last.fm API key. You can create one by registering an API account on the Last.fm website.
Configuration
To add the Last.fm service to your Home Assistant instance, use this My button:
Manual configuration steps
If the above My button doesn’t work, you can also perform the following steps manually:
-
Browse to your Home Assistant instance.
-
In the bottom right corner, select the
Add Integration button. -
From the list, select Last.fm.
-
Follow the instructions on screen to complete the setup.
After entering your API key and Last.fm username, you are asked to select additional Last.fm users to track. Your friends list is shown for convenience, but you can also enter any Last.fm username manually.
Configuration options
To add or remove tracked users after setup, go to Settings > Devices & services, select the Last.fm integration, and select Configure.
Supported functionality
Sensors
The integration creates one sensor per tracked Last.fm user.
- State: The currently playing track, formatted as “Artist - Title”. When the user is not listening, the state is “Not Scrobbling”.
- Entity picture: The user’s Last.fm avatar.
Each sensor also provides the following attributes:
-
last_played: The last track the user scrobbled, formatted as “Artist - Title”. -
play_count: The total number of tracks the user has scrobbled on Last.fm. -
top_played: The user’s most played track, formatted as “Artist - Title”.
Data updates
The integration pollsData polling is the process of querying a device or service at regular intervals to check for updates or retrieve data. By defining a custom polling interval, you can control how frequently your system checks for new data, which can help optimize performance and reduce unnecessary network traffic. [Learn more] Last.fm every 30 seconds for updated listening data.
Removing the integration
This integration follows standard integration removal. No extra steps are required.
To remove an integration instance from Home Assistant
- Go to Settings > Devices & services and select the integration card.
- From the list of devices, select the integration instance you want to remove.
- Next to the entry, select the three dots
menu. Then, select Delete.