I’ve been toying around in the developper tag and trying to use templates to “extract” a state attribute but I guess I’m reading the help wrong, as the only output I get is either None or an error.
the [x] is the index value of the list of items in the “next_events” attribute. since lists in jinja are 0 indexed then the first item is index value 0 → [0].
then you need to give it the key of the value you want in the list of attributes.
so in this case it’s index 0 of the list and the key you want is ‘name’.
to take it to the next level if you wanted the second item in the list of “phases”: