Alexa loses Tuya Smart Life scenes when HA restarts

Alexa is connected to HA via Nabu Casa, and HA is connected to Smart Life using the standard Tuya integration. I have many scenes in Smart Life that are commands for an IR blaster; Alexa routines use the scenes to lmplement voice commands e.g. “Alexa, TV to ALIBI” tells the TV to switch to HDMI1 and the Sky box to select channel 132. HA simply passes the scenes through.

All works fine until I reboot HA, then the actions that use the Smart Life scenes have all been deleted from the Alexa routines. Alexa still has the routines and the scenes, but the actions are missing; I have to reinsert them by hand into the routines. Rebuiilding Alexa routines every time I reboot HA is not acceptable. How do I avoid “breaking” by Alexa routines when HA restarts?

Here is some more detail, obtained by experimentation:

  1. After restarting HA, in Alexa I can no longer see the scenes from the Tuya integration; the routines that use them have the corresponding actions deleted.
  2. I can still see a scene that comes from a different integration (LG TV)
  3. The DEVICES that are connected though Smart Life are still present and working in Alexa
  4. In HA, the Smart Life scenes are still visible
  5. HA Cloud still has the scenes set as ‘exposed’ to Alexa
  6. In Alexa, I can ‘discover’ the scenes successfully, but then I have to rebuild all the routines (a few dozen) by hand.

This is infuriating! What am I missing??