I am playing around with a sensor that gets a random pokemon from the PokeAPI.
The url is: https://pokeapi.co/api/v2/pokemon/ but requires either a name or an id at the end
eg https://pokeapi.co/api/v2/pokemon/84
My idea is to have it load daily, and use this url with a random number for the id:
https://pokeapi.co/api/v2/pokemon/{random_number}
I currently have two issues.
- can’t think of the best way to generate a random number
- Was going to use the random integration but I cannot seem to set the frequency it generates a number.
- how to insert it into the url above
Any help would be appreciated