hello,
I’m new in HA
I would like to have a list of item, provide by an entity.
I found i need to use template, but when I change the selected value, this not work, alway lost
yes, i use it and this work thanks !
I thought i’m stupid … but no, you want store … and i dont understood why.
the basic list can, but not the template
i lost many hours for this …
You can set it up to self reference for the state which will basically just give it an initial value…but for it to actually function, you also need to enable optimistic mode so that the state is updated by any selection events. As far as I know, the variable option is undefined outside of select_option, so there’s no point in using it in the state template:
IIRC, the state will not survive reload of the Template integration or restart of HA. If you want to guarantee the state survives restart you should use an additional Helper.
In my opinion, this is an important aspect for creating a viable Template Select. Losing its state, after a reload/restart, is likely to be problematic for many applications.