I bought an RGB touch switch that doesn’t support Zigbee.
I combine it with a XIAO ESP32C6 that calculates the XY color code based on the PWM signal from the switch.
The XY signal is sent to HA via Zigbee
Code:
esp_zb_zcl_color_move_to_color_cmd_t cmd_color;
cmd_color.color_x = refer_x;
cmd_color.color_y = refer_y;
cmd_color.transition_time = 0;
cmd_color.address_mode = ESP_ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT;
cmd_color.zcl_basic_cmd.src_endpoint = 10;
esp_zb_lock_acquire(portMAX_DELAY);
esp_zb_zcl_color_move_to_color_cmd_req(&cmd_color);
esp_zb_lock_release();
my question is:
how can I use this switch to control other LED controllers that are already connected to HA via Zigbee?