Add lastfm documentation (#27268)

* Add lastfm documentation

* Apply suggestions from code review

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update lastfm.markdown

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
This commit is contained in:
Joost Lekkerkerker 2023-05-25 15:07:18 +02:00 committed by GitHub
parent 291b05edfd
commit c0f5fe84f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,38 +9,13 @@ ha_domain: lastfm
ha_platforms:
- sensor
ha_integration_type: integration
ha_config_flow: true
---
The `lastfm` sensor platform will allow you to see whenever a user starts scrobbling, their play count, last song played, and top song played on [Last.fm](https://www.last.fm/).
## Setup
## Prerequisites
To get an API key you need to create an [API account](https://www.last.fm/api/account/create).
## Configuration
To use Last.fm sensor with your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
sensor:
- platform: lastfm
api_key: YOUR_API_KEY
users:
- user1
- user2
```
{% configuration %}
api_key:
description: Your Last.fm API key.
required: true
type: string
users:
description: List of users.
required: true
type: list
keys:
username:
description: Username of the user to monitor.
{% endconfiguration %}
{% include integrations/config_flow.md %}