This is a custom component for Home Assistant to allow fetching song lyrics from Genius.
NOTE: this is a work in progress -- expect changes.
- Open HACS Settings and add this repository (https://github.com/robert-alfaro/genius-lyrics) as a Custom Repository (use Integration as the category).
- The
Genius Lyrics
page should automatically load (or find it in the HACS Store) - Click
Install
Copy the genius_lyrics
directory from custom_components
in this repository, and place inside your Home Assistant installation's custom_components
directory.
- Sign up for a free account at genius.com and authorize access to the Genius API to get your
client_access_token
. - Install this component
- Install markdown card mod lovelace-markdown-mod
- Add the following to your
configuration.yaml
genius_lyrics:
access_token: "your Genius client access token"
sensors:
- platform: template
sensors:
lyrics:
friendly_name: "Lyrics"
value_template: ""
- Create markdown card in lovelace.
- type: markdown
content: >
## [[ sensor.lyrics.attributes.artist ]] - [[ sensor.lyrics.attributes.title ]]
[[ sensor.lyrics.attributes.lyrics ]]
- Create an automation to call service
genius_lyrics.search_lyrics
upon media_player state change, providing "Artist", "Title".
{
"artist_name":"Protoje",
"song_title":"Mind of a King",
"entity_id":"sensor.lyrics"
}
Thanks to
- @johnwmillr for
lyricsgenius
python package! - @thomasloven for lovelace
markdown-mod
!