How to create a Template Sensor as Helper in the UI with attributes

I am trying to create a Template Sensor as Helper in the UI with attributes for the Helper sensor. I know it is possible using th YAML file but is there any way to do that same from the UI too?

Example:

4 Likes

No… at least not currently. The helper only supports a state template and the static attributes seen in your screenshot.

Hi
Is it a next feature of HA ?

1 Like

Wanting this also. Any updates?

1 Like

+1 upvote please

1 Like

I was looking for this too. Really think that the possibility of creating template sensors through UI was a great improvement, but missing the feature of adding custom template attributes to it. Is there, or should we add this to the feature request category to upvote it?

2 Likes

I have created a helper sensor via the UI. Now that I am getting more comfortable with this, I want to ïmprove" my helper sensor with some variables. Any way to do this via the existing UI or do I have to move the sensor to the configuration.yaml for that?
Would be so nice to be able to do this via the UI.

No, it cannot be done in the UI.

Just use additional sensors instead of adding attributes. In many cases, stacking dynamic attributes into a template sensor can have a detrimental effect by bloating the database with overly frequent copies of large state objects.

This still doesn’t appear to be possible, which is unfortunate. I found this thread while trying to do exactly this.

This has the disadvantage of not being able to store data structures, since state objects are always strings. If you want to store a list or dict, they have to go in attributes.

Though really the right fix is for HA to have proper variables.