Hello everyone everyone. I need your help with an application I’m trying to do.
I have made a lighting control application, when I enter the application and give the command to open, the lamp is on, the on button is activated, as seen in the block, I control over the link.
The problem is when I close the application and open it again, the lights that were on turn off.
after starting the app the first time, all lights are off?
there is redundancy in your blocks… you might want to do it like this to set the value in TinyDB only once and call the Web.Url only once in both cases (true or false)
and if the blocks in all these checkbox checked events are the same, you could use the advanced blocks to reduce even more… DRY - Don’t repeat yourself
Since it is “is checked” at the beginning of the block, every time I open the application, if the lamps are on, it turns off. I removed the extra commands. But still could not solve the problem.
you have to store the value always in TinyDB… after it has been switched on and off…
therefore the StoreValue block must be outside of the if else statement
Then you need to think to activate this command withe by clicking any button only. When you rewnter and still it is clicked mean surely it will activate