mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-25 11:46:31 +00:00
Merge pull request #8741 from effelle/development
HAss Discovery: ESP32 fix
This commit is contained in:
commit
b6e0ac5a87
@ -234,7 +234,7 @@ void HAssAnnounceRelayLight(void)
|
|||||||
TuyaDim = TuyaGetDpId((TUYA_MCU_FUNC_DIMMER) + active_device - 1);
|
TuyaDim = TuyaGetDpId((TUYA_MCU_FUNC_DIMMER) + active_device - 1);
|
||||||
#endif //USE_TUYA_MCU
|
#endif //USE_TUYA_MCU
|
||||||
|
|
||||||
bool RelayX = PinUsed(GPIO_REL1 +i-1) || (valid_relay >= i) || (TuyaRel > 0 && TuyaMod) || (TuyaRelInv > 0 && TuyaMod); // Check if the gpio is configured as Relay or force it for Sonoff DUAL R1 with MCU and Tuya MCU
|
bool RelayX = PinUsed(GPIO_REL1, i-1) || (valid_relay >= i) || (TuyaRel > 0 && TuyaMod) || (TuyaRelInv > 0 && TuyaMod); // Check if the gpio is configured as Relay or force it for Sonoff DUAL R1 with MCU and Tuya MCU
|
||||||
is_topic_light = Settings.flag.hass_light && RelayX || light_type && !RelayX || PwmMod || (TuyaDim > 0 && TuyaMod); // SetOption30 - Enforce HAss autodiscovery as light
|
is_topic_light = Settings.flag.hass_light && RelayX || light_type && !RelayX || PwmMod || (TuyaDim > 0 && TuyaMod); // SetOption30 - Enforce HAss autodiscovery as light
|
||||||
mqtt_data[0] = '\0'; // Clear retained message
|
mqtt_data[0] = '\0'; // Clear retained message
|
||||||
|
|
||||||
@ -887,4 +887,4 @@ bool Xdrv12(uint8_t function)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // USE_HOME_ASSISTANT
|
#endif // USE_HOME_ASSISTANT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user