Is this the best way to record music history playing? (i.e. create template sensor)

I am trying to record music playing history to our HomePods given there is no native ability within Apple’s ecosystem. I was able to do this by creating a template sensor with the following code:

  - platform: template
        friendly_name: Kitchen HomePod Music Playing Title
          - media_player.kitchen_homepod
        value_template: "{{state_attr('media_player.kitchen_homepod', 'media_artist')}} - {{state_attr('media_player.kitchen_homepod', 'media_title')}} ({{state_attr('media_player.kitchen_homepod', 'media_album_name')}})"

Now I can see the history on my dashboard using the history card for the new entity ‘kitchen_homepod_music_playing_title’.

However, since this is my first time creating and using a template sensor I’m wondering if this was the best/most efficient way to accomplish this? I had been looking to just log the existing attribute from the HomePod device, but couldn’t figure it out.

Any thoughts from those with more experience? Am I going to run into any issues with my chosen approach? (e.g. memory/performance/etc.)

Thanks in advance!