Woo-hoo! I figured this out, after some fiddling around with tuyadebug and tinytuya (and a zillion dead ends).
For these devices,
DP 1 is on/off
DP 2 is brightness with a range of 0-255
A typical config/.storage/core.device_registry item looks like this:
{
"config_entries": [
"...different for you..."
],
"connections": [],
"identifiers": [
[
"localtuya",
"local_...different for you..."
]
],
"manufacturer": "Unknown",
"model": "ue3zax30gexryaed",
"name": "LT DR dimmer",
"sw_version": "3.3",
"entry_type": null,
"id": "...different for you...",
"via_device_id": null,
"area_id": "...different for you...",
"name_by_user": null,
"disabled_by": null
}
A typical config/.storage/core.entity_registry item looks like this:
{
"entity_id": "light.lr_dr_dimmer",
"config_entry_id": "...different for you...",
"device_id": "..different for you...",
"area_id": null,
"unique_id": "local_..different for you...",
"platform": "localtuya",
"name": null,
"icon": null,
"disabled_by": null,
"capabilities": {
"effect_list": [],
"supported_color_modes": [
"brightness"
]
},
"supported_features": 5,
"device_class": null,
"unit_of_measurement": null,
"original_name": "LR DR dimmer",
"original_icon": null
}
And, finally, a typical config/.storage/core.config_entries item looks like this:
{
"entry_id": "...different for you...",
"version": 1,
"domain": "localtuya",
"title": "LT DR dimmer",
"data": {
"host": "192.168.1.170",
"device_id": "...different for you...",
"protocol_version": "3.3",
"friendly_name": "LT DR dimmer",
"local_key": "...different for you...",
"product_key": "ue3zax30gexryaed",
"dps_strings": [
"1 (value: True)",
"2 (value: 255)"
],
"entities": [
{
"brightness_lower": 1,
"brightness_upper": 255,
"color_temp_min_kelvin": 2700,
"color_temp_max_kelvin": 6500,
"music_mode": false,
"friendly_name": "LR DR dimmer",
"id": 1,
"brightness": 2,
"platform": "light"
}
]
},
"options": {},
"pref_disable_new_entities": false,
"pref_disable_polling": false,
"source": "user",
"unique_id": "...different for you...",
"disabled_by": null
}
I really don’t grok the localtuya entity configuration UI, but I had success with trial-and-error by choosing “light” as the entity type and then selecting the “1” drop-down for ID. (How can the ID be 1? I don’t know, but you can see it in the config items above.) The rest of the items look like this.
The important parts are to
- select item “2” from the drop-down (ignore the “value” part; it’s the current dimmer value)
- change the brightness lower and upper values to 1 and 255 (I used 1 instead of 0 because I don’t really know which it should be. I didn’t try this, but I suspect if you have an LED light that flickers or switches off below a certain value, you could set a higher minimum.)
- leave everything else as-is and submit