Use explicit color mode for RGBWW lights

This commit is contained in:
Erik 2021-07-15 18:16:59 +02:00
parent c3d757ca95
commit 978f2e3d5d
1 changed files with 4 additions and 2 deletions

View File

@ -102,7 +102,9 @@ const char HASS_DISCOVER_LIGHT_WHITE[] PROGMEM =
const char HASS_DISCOVER_LIGHT_CT[] PROGMEM = const char HASS_DISCOVER_LIGHT_CT[] PROGMEM =
",\"clr_temp_cmd_t\":\"%s\"," // cmnd/led2/CT ",\"clr_temp_cmd_t\":\"%s\"," // cmnd/led2/CT
"\"clr_temp_stat_t\":\"%s\"," // stat/led2/RESULT "\"clr_temp_stat_t\":\"%s\"," // stat/led2/RESULT
"\"clr_temp_val_tpl\":\"{{value_json." D_CMND_COLORTEMPERATURE "}}\""; "\"clr_temp_val_tpl\":\"{{value_json." D_CMND_COLORTEMPERATURE "}}\","
"\"clrm_stat_t\":\"%s\"," // stat/led2/RESULT
"\"clrm_val_tpl\":\"{%%if value_json.White%%}color_temp{%%else%%}hs{%%endif %%}\"";
const char HASS_DISCOVER_LIGHT_SCHEME[] PROGMEM = const char HASS_DISCOVER_LIGHT_SCHEME[] PROGMEM =
",\"fx_cmd_t\":\"%s\"," // cmnd/led2/Scheme ",\"fx_cmd_t\":\"%s\"," // cmnd/led2/Scheme
@ -530,7 +532,7 @@ void HAssAnnounceRelayLight(void)
char *color_temp_command_topic = stemp1; char *color_temp_command_topic = stemp1;
GetTopic_P(color_temp_command_topic, CMND, TasmotaGlobal.mqtt_topic, D_CMND_COLORTEMPERATURE); GetTopic_P(color_temp_command_topic, CMND, TasmotaGlobal.mqtt_topic, D_CMND_COLORTEMPERATURE);
TryResponseAppend_P(HASS_DISCOVER_LIGHT_CT, color_temp_command_topic, state_topic); TryResponseAppend_P(HASS_DISCOVER_LIGHT_CT, color_temp_command_topic, state_topic, state_topic);
ct_light = false; ct_light = false;
} }
if (LST_RGBW == Light.subtype && !PwmMulti && LightControl) { if (LST_RGBW == Light.subtype && !PwmMulti && LightControl) {