diff --git a/src/httpserver/http_fns.c b/src/httpserver/http_fns.c index e2e41b5eb..d9f8fc480 100644 --- a/src/httpserver/http_fns.c +++ b/src/httpserver/http_fns.c @@ -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);