How to use !secret in sensor template

Well, when I read your initial post and a comment, it’s still unclear where you want that base_url to be in your template. Maybe it’s a good idea to articulate your goal more precisely? :slight_smile:

To answer your question as I understand it now - you need to create an input_text:

input_text:
  base_url:
    initial: !secret base_url

and then in your template

{% set url = states('input_text.base_url') %}
6 Likes