Skip to content

Commit

Permalink
tuyamcu hass discoery edge case fix
Browse files Browse the repository at this point in the history
  • Loading branch information
openshwprojects committed Nov 29, 2023
1 parent 948f1f8 commit 960f281
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/httpserver/http_fns.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 960f281

Please sign in to comment.