Experience the same thing but at times the local tuya and others the cloud version, typically after load shedding. I have a automation setup that reloads the integration after loadshedding, I run both local and cloud tuya for to have some redundancy so all my automations trigger both the local...
If you are only using the CBI app then the simplest solution is to create multiple "on" automations at hourly (or more frequently) intervals during the on period and the same "off" automations in the off period. You will then have a automation run near to when power is restored to either switch...
As an alternative, In HA I have a trigger set on the device state change from unavailable to available, thus once power is restored the automation is triggered again which based on a schedule helper performs service calls.
They do not have built in timers, they receive external signal to trigger. They thus need wifi signal after power restore to once again allow them to be triggered. The only additional feature is that you are able to set their power state after power is restored, 1. Previous state 2. On 3. Off.
It seems that this might not work with all Olarm modules. My PAI Module does receive power, but it seems without serial access. My Olarm is a PA8505, so could that you have a different and likely newer model?
2022-10-21 05:33:26,133 - INFO - PAI - Starting...
2022-10-21 05:33:26,133 - INFO...