Help needed on logging media player title

Some time ago I have written an automation to succesfully log playing media title and artist to logbook:

Now I do not see artist and title in logs anymore and template. When in developer tools checking the template:

{{ states.media_player.living_room_speaker.attributes.media_title }}
{{ states.media_player.living_room_speaker.attributes.media_artist }}

I get error:

‘homeassistant.util.read_only_dict.ReadOnlyDict object’ has no attribute ‘media_title’

Any ideas why is it happening? I have not changed the template or updated anything.

Thanks in advance.

P.s. the media player is google chromecast audio.