Merge pull request #9175 from emontnemery/hass_fix_rgbww_state

Make hass use white level also for RGBWW lights
This commit is contained in:
Theo Arends 2020-08-27 18:06:00 +02:00 committed by GitHub
commit 1d62775ad4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -95,7 +95,7 @@ const char HASS_DISCOVER_LIGHT_WHITE[] PROGMEM =
",\"whit_val_cmd_t\":\"%s\"," // cmnd/led2/White
"\"whit_val_stat_t\":\"%s\"," // stat/led2/RESULT
"\"whit_val_scl\":100,"
"\"whit_val_tpl\":\"{{value_json.Channel[3]}}\"";
"\"whit_val_tpl\":\"{{value_json." D_CMND_WHITE "}}\"";
const char HASS_DISCOVER_LIGHT_CT[] PROGMEM =
",\"clr_temp_cmd_t\":\"%s\"," // cmnd/led2/CT
@ -336,7 +336,7 @@ void HAssAnnounceRelayLight(void)
GetTopic_P(effect_command_topic, CMND, mqtt_topic, D_CMND_SCHEME);
TryResponseAppend_P(HASS_DISCOVER_LIGHT_SCHEME, effect_command_topic, state_topic);
}
if (LST_RGBW == Light.subtype) { wt_light = true; }
if (LST_RGBW <= Light.subtype) { wt_light = true; }
if (LST_RGBCW == Light.subtype) { ct_light = true; }
}
@ -348,7 +348,7 @@ void HAssAnnounceRelayLight(void)
TryResponseAppend_P(HASS_DISCOVER_LIGHT_CT, color_temp_command_topic, state_topic);
ct_light = false;
}
if ((!ind_light && wt_light) || (LST_RGBW == Light.subtype &&
if ((!ind_light && wt_light) || (LST_RGBW <= Light.subtype &&
!PwmMulti && LightControl)) {
char *white_temp_command_topic = stemp1;