Open Sjorsa1 opened 4 years ago
@Sjorsa1 and maybe others that see this issue. This error occurs when your token is wrong as the phonetrack API returns an empty list []
when the token does not exist.
You can test this yourself by navigating to the url https://<nextcloud-domain>/index.php/apps/phonetrack/api/getlastpositions/<your token>
and it should return a json object like (I replaced all values of mine with 0):
{
"<token>": {
"<device_name>": {
"useragent": "PhoneTrack/0.0",
"lat": 0.0,
"lon": 0.0,
"timestamp": 0,
"batterylevel": 0,
"satellites": 0,
"accuracy": 0,
"altitude": 0,
"speed": 0.0,
"bearing": 0.0
}
}
}
I get the following errors when starting up homeassistant with this integration: