Post HA restart, automations don't activate all integration devices

Noticed today after restarting HA that some of my automations, which call devices in different integrations, weren’t all turning on. The one I noticed is the Tuya integration, but there may be others. if I went to the actual device in HA and manually toggled it on then off, then ran the action in the automation it turned on.
So I wanted to ask if there is a certain method to ensuring specific device integrations actually loaded/linked without having to do this each time HA is restarted (hopefully not often). I’m trying to migrate away from Tuya stuff but there are stil a few lingering items I haven’t replaced yet.

Thanks

So it sounds like your Tuya devices are not loading after a restart and the missing devices cause your automations to be disabled. There are a few things you can do (other than not buying Tuya wifi devices):

  1. Avoid using device automations. See: Why and how to avoid device_ids in automations and scripts

  2. Are you using Tuya Cloud? If so have a look at using the third party Local Tuya or Tuya Local integration instead.

  3. Last resort: use an automation that is triggered a short while after a restart to reload the devices and entities.

I suspect just option (1) should solve your issue.

Thanks for the reply.
I had started with a bunch of devices that used the smart life app… When I started using HA, all the devices were integrated under Tuya. Oddly enough a few months ago I noticed the smartthings integration all of a sudden had mirrored all the tuya devices minus 2-3, and I could control those devices under the ST device listing just fine. So I don’t know why these 2-3 devices wont be picked up by ST or I’d remove the tuya integration.
I’ll probably do option 3 for the time being while looking into the first option you mentioned. Looked like that would take bit of time to change all my automations over.