Trigger based template sensor to store global variables

Hi, i think i can really make use of this instead of creating helpers for each parameters of every new user.

Could I create this kind of setup per user

variables:
  username1: 
     option1: true
     option2: 30
  username2:
     option1: true
     option2: 30

Also, creating or changing a variable can only be done in an automation and script, right? It can’t be done, for example, in Developper Tools → Template?

okay, I’ve figured it out the first question of my post:

In Developper Tools → Events

event type:
set_variable

Event data (YAML, optional)
key: user1
value: 
  option1: true
  option2: 43

In Developper Tools → Template

{{ state_attr('sensor.variables', 'variables')['user1'].value['option1'] }}
{{ state_attr('sensor.variables', 'variables')['user1'].value['option2'] }}

True
43

You can fire an event in developer tools > event

Could you elaborate on how I could achieve this.

I’m looking to store user’s parameters. I might not have a huge list of parameters but might end up with many users. Both list could grow so I’m trying to plan ahead.

Note: I don’t need this tomorrow. In my current situation, this is already much better than creating a list of helpers for every new user.

Note2: I’m also considering the possibility of having each user assigned to a category. Something similar to a user level like beginner, intermediate, advanced…