Just a small warning: make sure to check whether your device needs to be added to the Tuya cloud to get a local API key. I was only able to get "my" lamp working locally after registering it via the app and creating a developer account.
Another option can be flashing it with Tasmota: https://tasmota.github.io/docs/Tuya-Convert/