mirror of https://github.com/arendst/Tasmota.git
Merge pull request #8504 from effelle/development
HAss force [is_topic_light] for PWM_Dimmer module
This commit is contained in:
commit
089379ccb6
|
@ -218,7 +218,7 @@ void HAssAnnounceRelayLight(void)
|
|||
for (uint32_t i = 1; i <= MAX_RELAYS; i++)
|
||||
{
|
||||
bool RelayX = PinUsed(GPIO_REL1 +i-1);
|
||||
is_topic_light = Settings.flag.hass_light && RelayX || light_type && !RelayX; // SetOption30 - Enforce HAss autodiscovery as light
|
||||
is_topic_light = Settings.flag.hass_light && RelayX || light_type && !RelayX || PwmMod; // SetOption30 - Enforce HAss autodiscovery as light
|
||||
|
||||
mqtt_data[0] = '\0'; // Clear retained message
|
||||
|
||||
|
@ -260,7 +260,7 @@ void HAssAnnounceRelayLight(void)
|
|||
TryResponseAppend_P(HASS_DISCOVER_DEVICE_INFO_SHORT, unique_id, ESP_getChipId());
|
||||
|
||||
#ifdef USE_LIGHT
|
||||
if ((i >= Light.device)) {
|
||||
if (i >= Light.device) {
|
||||
if (!RelayX || PwmMod) {
|
||||
char *brightness_command_topic = stemp1;
|
||||
strncpy_P(stemp3, Settings.flag.not_power_linked ? PSTR("last") : PSTR("brightness"), sizeof(stemp3)); // SetOption20 - Control power in relation to Dimmer/Color/Ct changes
|
||||
|
|
Loading…
Reference in New Issue