For a long time, I wanted to replace the regular Tuya integration that allowed my HomeAssistant to control my curtain controllers with the LocalTuya integration, thereby avoiding cloud for controlling local devices. Since, this morning, after a router restart and/or maybe some HomeAssistant upgrade, my controllers escaped the HomeAssistant control, I decided to try with LocalTuya.
Connecting the LocalTuya integration to the Tuya cloud to retrieve the local keys was just as documented in LocalTuya’s documentation. But then, adding the curtain controller as a « cover » fixture consistently failed.
Looking at the Device Logs on the Tuya IoT developer platform showed that the device used only one DPID for both getting orders and reporting its state. It is both reporting and publishing the Status field with values like « turn on », « turn off » and « Pause ».
So the right way to configure the curtain controller in LocalTuya is to add it as a « select » entity. The possible values should be « 1;2;3 » with corresponding friendly values « Up;Down;Stop ».
Setting the entity to one of those values triggers the relay until it reaches the end. Then, it automatically turns back to « Stop ».
I still need to add a template cover entity in my configuration.yaml:
cover:
- platform: template
covers:
curtain:
friendly_name: "Curtain"
open_cover:
service: select.select_option
target:
entity_id: select.curtain_status
data:
option: Up
close_cover:
service: select.select_option
target:
entity_id: select.curtain_status
data:
option: Down
stop_cover:
service: select.select_option
target:
entity_id: select.curtain_status
data:
option: Stop
Langage du code : CSS (css)
For reference, these are curtain controllers bought from Amazon:

- Brand: LoraTapuk
- Reference : HU-XI-201
- ASIN: B085HK5MXL