logo elektroda
logo elektroda
X
logo elektroda

Splitting Lumary (Tuya) Light Controls into Two Entities in Home Assistant

dblanc28 240 0
ADVERTISEMENT
  • #1 21342748
    dblanc28
    Level 2  
    I am trying to use openBK to control some Lumary (Tuya) lights that I flashed openBK on. I am integrating them with home assistant and I got everything working but I would like to break the functionality into 2 separate HA entities and im not sure how to do that from the openBK web app.

    The lights I have are really 2 lights in one. There is a cw white light that faces down and then there is a rgb led strip that goes around the outside of the light. So really there is a white light and a rgb light. I want to break the controls up into 2 entities, one for the white light and one for the rgb light. I have a json template that has both controls. I have edited that template to only control the white or only control the rgb. But I dont know how I can have the openBK web app create 2 different entities for the same device for me.
    AI: Could you specify which version of openBK you are using?
    Version of openBK is 1.17.606
    AI: Can you provide more details about your current setup in Home Assistant, particularly how the lights are currently configured?
    This is the template I am using in the web app:
    {
    "Jsonver":"1.0.3",
    "brightmin":"5",
    "gmwb":"75",
    "title20":"1",
    "gmwg":"70",
    "wfcfg":"spcl_auto",
    "colormin":"10",
    "pmemory":"1",
    "gmkb":"60",
    "pairt":"60",
    "cmod":"rgbcw",
    "nightled":"0",
    "cwtype":"0",
    "rstbr":"50",
    "colormax":"100",
    "buzzer":"0",
    "c_pin":"24",
    "notdisturb":"1",
    "module":"CBU",
    "b_pin":"8",
    "b_lv":"1",
    "cwmaxp":"100",
    "dmod":"0",
    "brightmax":"100",
    "wfct":"3",
    "pwmhz":"10000",
    "r_pin":"6",
    "defbright":"100",
    "beaconrc":"1",
    "rstnum":"3",
    "rstcor":"c",
    "r_lv":"1",
    "deftemp":"100",
    "c_lv":"1",
    "mutex":"0",
    "g_lv":"1",
    "wt":"20",
    "onofftime":"800",
    "prodagain":"0",
    "remdmode":"1",
    "cagt":"20",
    "g_pin":"7",
    "w_lv":"1",
    "colorpfun":"0",
    "gmwr":"100",
    "rgbt":"10",
    "gmkg":"60",
    "onoffmode":"0",
    "w_pin":"26",
    "rsttemp":"100",
    "category":"0505",
    "gmkr":"80",
    "defcolor":"c",
    "crc":"100"
    }

    and this is the yaml thats generated from that json template for HA:
    mqtt:
    light:
    - unique_id: "Test_Lumary_Light_light"
    name: 0
    rgb_command_template: "{{ '#%02x%02x%02x0000' | format(red, green, blue)}}"
    rgb_value_template: "{{ value[0:2]|int(base=16) }},{{ value[2:4]|int(base=16) }},{{ value[4:6]|int(base=16) }}"
    rgb_state_topic: "obkE1655128/led_basecolor_rgb/get"
    rgb_command_topic: "cmnd/obkE1655128/led_basecolor_rgb"
    command_topic: "cmnd/obkE1655128/led_enableAll"
    state_topic: "obkE1655128/led_enableAll/get"
    availability_topic: "obkE1655128/connected"
    payload_on: 1
    payload_off: 0
    brightness_command_topic: "cmnd/obkE1655128/led_dimmer"
    brightness_state_topic: "obkE1655128/led_dimmer/get"
    brightness_scale: 100
    color_temp_command_topic: "cmnd/obkE1655128/led_temperature"
    color_temp_state_topic: "obkE1655128/led_temperature/get"
  • ADVERTISEMENT
ADVERTISEMENT