Somehow the addon stopped working yesterday… Tried a lot but cant find anything. Getting the message:
Failed to call service spotcast/start. empty range for randrange() (0, 0, 0)
2020-09-14 13:27:54 DEBUG (SyncWorker_50) [custom_components.spotcast] websocket_handle_devices msg: {'type': 'spotcast/devices', 'id': 84}
2020-09-14 13:27:54 DEBUG (SyncWorker_50) [custom_components.spotcast] setting up with account default
2020-09-14 13:27:54 DEBUG (SyncWorker_50) [custom_components.spotcast] expires: 1600086471 time: 1600082874.2053912
2020-09-14 13:27:51 DEBUG (SyncWorker_23) [custom_components.spotcast] setting up with account default
2020-09-14 13:27:51 DEBUG (SyncWorker_23) [custom_components.spotcast] Version: 3.4.2, playing URI: spotify:playlist:2WoOqqMVjSL0nLBHeVPpgF on device-id: 16a3f3ad93f100cfca20555072d10cee182e22a6
2020-09-14 13:27:51 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.2774958192] empty range for randrange() (0, 0, 0)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 125, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1308, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1347, in _execute_service
await self._hass.async_add_executor_job(handler.func, service_call)
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/spotcast/__init__.py", line 313, in start_casting
play(client, spotify_device_id, uri, random_song, repeat, shuffle, position)
File "/config/custom_components/spotcast/__init__.py", line 247, in play
position = random.randint(0, results["total"] - 1)
File "/usr/local/lib/python3.8/random.py", line 248, in randint
return self.randrange(a, b+1)
File "/usr/local/lib/python3.8/random.py", line 226, in randrange
raise ValueError("empty range for randrange() (%d, %d, %d)" % (istart, istop, width))
ValueError: empty range for randrange() (0, 0, 0)