mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-10 19:45:39 +00:00
broken mqtt discovery edge case fix?
This commit is contained in:
@ -1625,6 +1625,9 @@ void doHomeAssistantDiscovery(const char *topic, http_request_t *request) {
|
||||
}
|
||||
|
||||
if (pwmCount == 5 || ledDriverChipRunning) {
|
||||
if (dev_info == NULL) {
|
||||
dev_info = hass_init_light_device_info(LIGHT_RGBCW);
|
||||
}
|
||||
// Enable + RGB control + CW control
|
||||
MQTT_QueuePublish(topic, dev_info->channel, hass_build_discovery_json(dev_info), OBK_PUBLISH_FLAG_RETAIN);
|
||||
hass_free_device_info(dev_info);
|
||||
|
||||
Reference in New Issue
Block a user