Here is a similar topic regarding template for mqtt select options
These attr options are really nice and helped me a lot: