Hi,
(I’m relatively new ro developing integrations so this must be me doing something wrong, but I’m hitting a brick wall)
So, I’m building an integration where configuring a new entry involves waiting for a network event (HTTP GET) on the backend, which can take a while, so I’m showing a spinning progress message (with a scannable QR code btw).
Moving nicely through steps, starting task for the backend. For now (dev), the backend task just delays for 10 seconds and returns. I have:
return self.async_show_progress(
progress_action="my_action",
progress_task=self._task,
description_placeholders={
"qr_code": f"<img src='data:image/png;base64,{self._qr_img_str}' />"
},
)
I receive the progress dialog just fine, with the QR and the spinner. Now, my task runs and completes. The spinning continues. I have code in my user step that does this:
if self._task:
(... some unrelated stuff ...)
if self._task.done():
_LOGGER.info("about to show_progress_done")
return self.async_show_progress_done(next_step_id="user")
Indeed the call to show_progress_done is executed.
However, the progress dialog remains on screen, spinning endlessly, and the “user” step is not re-entered.
Surely I’m doing something wrong here, but I haven’t figured out what that is.
Thanks!