LocalTuya vs Ledvance sun@home Classic A 75 E27

Hello there,

after a hiatus of trying to use smartthings, the tuya iot hub, etc , I am falling back to the LocalTuya integration for setting up my Ledvance sun@home Classic A 75 E27 light bulbs, as they just only connect to the ledvance app (which is a real bummer).

First I use GitHub - FlagX/ha-ledvance-tuya-resync-localkey: pyscript for homeassistant to resync local keys from private tuya api to get the device id and the local key from my devices which have to be connected to the ledvance app.

Then LocalTuya discovers them with Version 3.4 and in the next step, the device type dropdown shows them as switch.
When I configure them to be a “light”, I am not quite sure if I am mapping the values correctly, as I have difficulties afterwards when for setting up the scenes and preset moods that come with the app - basically beeing able to access the bright_value, temp_value next to the switch_value to mimic these scenes as a starting point (I have 4 of these bulps).

In preparation, I extracted the tuya scheme for these bulbs and alll the conigurations for the presets and scenes by modifying the FlagX/ha-ledvance-tuya-resync-localkey tool and added the output to my fork of it, with the hope to get directions on what i might be doing incorrect or can do better. It should contain all data for the ledvance sun@home classic bulb.

Here is a screenshot of the LocalTuya adding dialogue:

…and of the dropdown of the choices:

I will add the extracted tuya schema for the bulb on the very bottom.

I am wondering what the first textfield is telling me. It says “ID*” and is filled with the value for “20” : “Switch_Led” - and the switching is working, so this i smaybe a UI bug?

It is unclear to me what to configure for “color mode” and “color” and “scene”?
If I add my scene_data to the scene field, I see scenes and i am able to switch them, but then th iu switches from color temp to color picker and the brightness control is not working anymore…

Edit: I now know why its not working anymore when selecting the scene switch. My bulbs are not RGB or RGBWW, but just white with temp. localtuya suggests otherwise with the scene presets:

Tuya Schema:

[
    {
        "attr": 643,
        "canTrigger": true,
        "code": "switch_led",
        "defaultRecommend": true,
        "editPermission": false,
        "executable": true,
        "extContent": "",
        "iconname": "icon-dp_power",
        "id": 20,
        "mode": "rw",
        "name": "\u5f00\u5173",
        "property": {
            "type": "bool"
        },
        "type": "obj"
    },
    {
        "attr": 640,
        "canTrigger": true,
        "code": "work_mode",
        "defaultRecommend": true,
        "editPermission": false,
        "executable": true,
        "extContent": "",
        "iconname": "icon-dp_mode",
        "id": 21,
        "mode": "rw",
        "name": "\u6a21\u5f0f",
        "property": {
            "range": [
                "white",
                "colour",
                "scene",
                "music"
            ],
            "type": "enum"
        },
        "type": "obj"
    },
    {
        "attr": 646,
        "canTrigger": true,
        "code": "bright_value",
        "defaultRecommend": true,
        "editPermission": false,
        "executable": true,
        "extContent": "",
        "iconname": "icon-liangdu1",
        "id": 22,
        "mode": "rw",
        "name": "\u4eae\u5ea6\u503c",
        "property": {
            "min": 10,
            "max": 1000,
            "scale": 0,
            "step": 1,
            "type": "value"
        },
        "type": "obj"
    },
    {
        "attr": 646,
        "canTrigger": true,
        "code": "temp_value",
        "defaultRecommend": true,
        "editPermission": false,
        "executable": true,
        "extContent": "",
        "iconname": "icon-dp_half",
        "id": 23,
        "mode": "rw",
        "name": "\u51b7\u6696\u503c",
        "property": {
            "min": 0,
            "max": 1000,
            "scale": 0,
            "step": 1,
            "type": "value"
        },
        "type": "obj"
    },
    {
        "attr": 640,
        "canTrigger": true,
        "code": "scene_data",
        "defaultRecommend": true,
        "editPermission": false,
        "executable": true,
        "extContent": "",
        "iconname": "icon-shoucang",
        "id": 25,
        "mode": "rw",
        "name": "\u573a\u666f",
        "property": {
            "type": "string",
            "maxlen": 255
        },
        "type": "obj"
    },
    {
        "attr": 642,
        "canTrigger": true,
        "code": "countdown",
        "defaultRecommend": true,
        "editPermission": false,
        "executable": true,
        "extContent": "",
        "iconname": "icon-a_nav_timer",
        "id": 26,
        "mode": "rw",
        "name": "\u5012\u8ba1\u65f6",
        "property": {
            "unit": "s",
            "min": 0,
            "max": 86400,
            "scale": 0,
            "step": 1,
            "type": "value"
        },
        "type": "obj"
    },
    {
        "attr": 640,
        "canTrigger": true,
        "code": "control_data",
        "defaultRecommend": true,
        "editPermission": false,
        "executable": true,
        "extContent": "",
        "iconname": "icon-dp_box2",
        "id": 28,
        "mode": "wr",
        "name": "\u8c03\u8282",
        "property": {
            "type": "string",
            "maxlen": 255
        },
        "type": "obj"
    },
    {
        "attr": 640,
        "canTrigger": true,
        "code": "rhythm_mode",
        "defaultRecommend": true,
        "editPermission": false,
        "executable": true,
        "extContent": "",
        "iconname": "icon-dp_time3",
        "id": 30,
        "mode": "rw",
        "name": "\u751f\u7269\u8282\u5f8b",
        "property": {
            "type": "raw",
            "maxlen": 128
        },
        "type": "raw"
    },
    {
        "attr": 640,
        "canTrigger": true,
        "code": "sleep_mode",
        "defaultRecommend": true,
        "editPermission": false,
        "executable": true,
        "extContent": "",
        "iconname": "icon-dp_sleep",
        "id": 31,
        "mode": "rw",
        "name": "\u5165\u7761\u8ba1\u5212",
        "property": {
            "type": "raw",
            "maxlen": "255"
        },
        "type": "raw"
    },
    {
        "attr": 640,
        "canTrigger": true,
        "code": "wakeup_mode",
        "defaultRecommend": true,
        "editPermission": false,
        "executable": true,
        "extContent": "",
        "iconname": "icon-dp_sun",
        "id": 32,
        "mode": "rw",
        "name": "\u5524\u9192\u8ba1\u5212",
        "property": {
            "type": "raw",
            "maxlen": "255"
        },
        "type": "raw"
    },
    {
        "attr": 640,
        "canTrigger": true,
        "code": "power_memory",
        "defaultRecommend": true,
        "editPermission": false,
        "executable": true,
        "extContent": "",
        "iconname": "icon-dp_lightning",
        "id": 33,
        "mode": "rw",
        "name": "\u901a\u7535\u53cd\u5e94",
        "property": {
            "type": "raw",
            "maxlen": "255"
        },
        "type": "raw"
    },
    {
        "attr": 640,
        "canTrigger": true,
        "code": "do_not_disturb",
        "defaultRecommend": true,
        "editPermission": false,
        "executable": true,
        "extContent": "",
        "iconname": "icon-dp_sleep",
        "id": 34,
        "mode": "rw",
        "name": "\u901a\u7535\u52ff\u6270",
        "property": {
            "type": "bool"
        },
        "type": "obj"
    },
    {
        "attr": 128,
        "canTrigger": true,
        "code": "remote_switch",
        "defaultRecommend": false,
        "editPermission": false,
        "executable": true,
        "extContent": "",
        "iconname": "icon-dp_power",
        "id": 41,
        "mode": "rw",
        "name": "\u9065\u63a7\u5668\u5f00\u5173",
        "property": {
            "type": "bool"
        },
        "type": "obj"
    }
]

Any hints appreciated and I hope the extracted data is of help to anyone.

Regards, Chris

Hey, thanks for you dump. That was very helpful! I got brightness and color temp running on my Ledvance Panel LED light.

One will need to set the proper id for both color temp and color temperature. In this case brightness to 22 and temperature to id 23.