I am trying to play a 1 hour Youtube video but starting at a random time in the clip.
This because it’s linked to a zone active and re-starting the video is boring.
Now I tried to use this URL in the Chromecast app, but it starts the video from the start and not at 2 minutes: https://www.youtube.com/watch?v=Qz6XNSB0F3E&t=120
The next step would be to randomize the start using:
t={{round(random(0,120))}}
Does anyone know how to include the variable in the Chromecast app URL ?`
Also tried to use a tag in the url and to let a viarable calculate the random number.
But this also didn’t do the trick.
Google TTS gives a random number, so that parts works, but the video starts at at 0 seconds:
As far as I know Homey only allows number calculations, not string calculations. Google cast does allow tags for the URL, so what I would do is use Homeyscript to generate the complete URL and put it in a Better Logic variable (normal logic variables cannot be set from Homeyscript as far as I know). You then can use the variable as an URL you can cast.
It should at least be possible to maybe make a separate flow that does a calculation, put the result in a text variable and use that variable as your URL tag?