Hello,
I used to have my Tuya devices configured within configuration.yaml but recently updated it to the latest version of LocalTuya, which offers config through the UI. In the old version, I somehow managed to set up a dimmer switch in such a way that I could set its brightness while the light stayed off. It was glorious, and based on my Google searches, a bit of a unicorn, but since I updated, I can’t figure out how to make it work with the latest version of the integration. If I change the brightness of the light now, the light turns on when I do.
I have backups of my configuration and my automations and the main (maybe only?) difference that I see is that I’d configured the device with two entities, one using the “switch” platform, which controlled on/off via DP #1, and another using the “light” platform, which supported the brightness, and it allowed me to change the brightness exactly how I wanted while the light was off.
Strangely, when I look at that old configuration, it almost seems like it’s configured incorrectly, yet it worked.
Old config:
- host: 192.168.xxx.xxx
device_id: 71033xxxxxxxxxxxxxxx
local_key: 03c0fxxxxxxxxxxx
friendly_name: Bathroom Light
protocol_version: "3.3"
entities:
- platform: binary_sensor
friendly_name: Bathroom Light
id: 1
state_on: "true"
state_off: "false"
- platform: switch
friendly_name: Bathroom Light Switch
id: 1
- platform: light
friendly_name: Bathroom Dimmer
id: 2 # Usually 1 or 20
brightness: 2 # Optional, usually 3 or 22, default: "none"
brightness_lower: 10 # Optional, usually 0 or 29, default: 29
brightness_upper: 1000 # Optional, usually 255 or 1000, default: 1000
Does anyone have any experience with version 4.1.0 of LocalTuya that can help me with this?
Thanks!