How to access device area as a variable within ESPHome config?

I use this config it allows you to type the media player name

https://gist.githubusercontent.com/HarvsG/40468d1d0e3f444d9a1907f26a503bc6/raw/a350b74a614ca8ec9a3cdfa26297f10e3b80dd5d/m5stack-atom-echo-mww2beta-reply-selector-full-config.yaml