From 21c6a0dd7eb58ed56b669c9db0e9e54c2154b341 Mon Sep 17 00:00:00 2001 From: openshwprojects Date: Thu, 4 May 2023 11:41:43 +0200 Subject: [PATCH] header fx, comment --- src/httpserver/hass.h | 1 + src/httpserver/http_fns.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/httpserver/hass.h b/src/httpserver/hass.h index a1ba0e89a..df23bac80 100644 --- a/src/httpserver/hass.h +++ b/src/httpserver/hass.h @@ -88,6 +88,7 @@ HassDeviceInfo* hass_init_relay_device_info(int index, ENTITY_TYPE type); HassDeviceInfo* hass_init_device_info(ENTITY_TYPE type, int index, char* payload_on, char* payload_off); HassDeviceInfo* hass_init_light_device_info(ENTITY_TYPE type); HassDeviceInfo* hass_init_power_sensor_device_info(int index); +HassDeviceInfo* hass_init_light_singleColor_onChannels(int toggle, int dimmer, int brightness_scale); HassDeviceInfo* hass_init_binary_sensor_device_info(int index, bool bInverse); HassDeviceInfo* hass_init_sensor_device_info(ENTITY_TYPE type, int channel, int decPlaces, int decOffset); const char* hass_build_discovery_json(HassDeviceInfo* info); diff --git a/src/httpserver/http_fns.c b/src/httpserver/http_fns.c index 40bed845d..3e8475204 100644 --- a/src/httpserver/http_fns.c +++ b/src/httpserver/http_fns.c @@ -1603,7 +1603,9 @@ void doHomeAssistantDiscovery(const char* topic, http_request_t* request) { cJSON_InitHooks(&hooks); - // try to pair toggles with dimmers + // try to pair toggles with dimmers. This is needed only for TuyaMCU, + // where custom channel types are used. This is NOT used for simple + // CW/RGB/RGBCW/etc lights. while (true) { // find first dimmer dimmer = -1;