I have a screen with some switches and I want the switches on to be saved and appear on when the screen is loaded later. To do so they are added to a list which is stored in TinyDB. When the given screen gets initialized, TinyDB is called and each item (which should be a component) in that list is switched on.
The problem is that apparently the switches are saved as strings and not as components. What can I do?
When any switch is switched on, it's saved in a given list.
Then the given list is stored in TinyDB.
There are 7 lists for each day of the week (which is chosen on another screen).
When the screen is initialized, TinyDB is called and each item (which should be a component) is switched on.