mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-11 07:35:28 +00:00
tuyamcu hass discoery edge case fix
This commit is contained in:
@ -1759,6 +1759,10 @@ void doHomeAssistantDiscovery(const char* topic, http_request_t* request) {
|
||||
#endif
|
||||
//if (relayCount > 0) {
|
||||
for (i = 0; i < CHANNEL_MAX; i++) {
|
||||
// if already included by light, skip
|
||||
if (BIT_CHECK(flagsChannelPublished, i)) {
|
||||
continue;
|
||||
}
|
||||
bool bToggleInv = g_cfg.pins.channelTypes[i] == ChType_Toggle_Inv;
|
||||
if (h_isChannelRelay(i) || g_cfg.pins.channelTypes[i] == ChType_Toggle || bToggleInv) {
|
||||
// TODO: flags are 32 bit and there are 64 max channels
|
||||
|
||||
Reference in New Issue
Block a user