Hello!
For example, some TV can be slowly, so when I run the app, i don't know its current state, and can't be sure, that I can continue to execute another actions with app via code. Now I use sleep for it, but it is still too flaky code.
Here is my piece of code:
dev_mode = [x for x in apps if 'developer' in x['title'].lower()][0]
app.launch(dev_mode)
sleep(7) # it needs because smarttv too slowly, may be needed more
Or, may be you can show me more effective way for it?