Service to set attribute of input_text?

I just confirmed that set_state.py can create/set an attribute for an Input Text. However, the attribute disappears after a restart (so it behaves the same way as using Developer Tools).

I suggest you consider using the following Trigger-based Template Sensor which allows you to dynamically store data (list, dict, boolean, etc).

An alternative, that also uses a Trigger-based Template Sensor, is this one:

However, for your application that requires storing a dict, it would need to be modified slightly to store the value in an attribute as opposed to state.

1 Like