-
Create a Genius.com access token:
- Sign up for a free account at genius.com if you don't have one.
- Open the New API Client page and fill in App Name, App Website URL, and Redirect URL (this won't be used).
- Once you've saved the new client, click the button to generate a
Client Access Token
(record this somewhere safe).
-
Install this integration
-
Enable Netease Lyrics in
configuration.yaml
by adding the following (substitute your access token from step 1):netease_lyrics: access_token: "3SxSxqZJOtz5fYlkFXv-12E-mgripD0XM7v0L091P3Kz22wT9ReCRNg0qmrYeveG" entities: - media_player.foobar
The above configuration will create a sensor entity
sensor.foobar_lyrics
. -
Create markdown card in lovelace:
type: vertical-stack cards: - type: media-control entity: media_player.foobar - type: conditional conditions: - entity: sensor.foobar_lyrics state: 'on' card: type: markdown content: >- ## {{ states.sensor.foobar_lyrics.attributes.media_artist }} - {{ states.sensor.foobar_lyrics.attributes.media_title }} {{ states.sensor.foobar_lyrics.attributes.media_lyrics }}
The above lovelace card groups the media player and lyrics sensor together. The conditional portion will hide the lyrics sensor when the media player is off.
{
"media_artist":"Protoje",
"media_title":"Mind of a King",
"entity_id":"sensor.foobar_lyrics"
}
media_artist: "Protoje"
media_title: "Mind of a King"
entity_id: sensor.foobar_lyrics