diff --git a/tasmota/support_device_groups.ino b/tasmota/support_device_groups.ino index 4d7683ab3..cd628522e 100644 --- a/tasmota/support_device_groups.ino +++ b/tasmota/support_device_groups.ino @@ -113,8 +113,8 @@ void DeviceGroupsInit(void) // If relays in separate device groups is enabled, set the device group count to highest numbered // button. if (Settings->flag4.multiple_device_groups) { // SetOption88 - Enable relays in separate device groups - for (uint32_t index = 0; index < MAX_KEYS; index++) { - if (PinUsed(GPIO_KEY1, index)) device_group_count = index + 1; + for (uint32_t relay_index = 0; relay_index < MAX_RELAYS; relay_index++) { + if (PinUsed(GPIO_REL1, relay_index)) device_group_count = relay_index + 1; } } diff --git a/tasmota/xdrv_10_rules.ino b/tasmota/xdrv_10_rules.ino index 32c31cb77..b6dd01d4c 100644 --- a/tasmota/xdrv_10_rules.ino +++ b/tasmota/xdrv_10_rules.ino @@ -2200,7 +2200,7 @@ void CmndEvent(void) if (XdrvMailbox.data_len > 0) { strlcpy(Rules.event_data, XdrvMailbox.data, sizeof(Rules.event_data)); #ifdef USE_DEVICE_GROUPS - SendDeviceGroupMessage(1, DGR_MSGTYP_UPDATE, DGR_ITEM_EVENT, XdrvMailbox.data); + if (!XdrvMailbox.grpflg) SendDeviceGroupMessage(1, DGR_MSGTYP_UPDATE, DGR_ITEM_EVENT, XdrvMailbox.data); #endif // USE_DEVICE_GROUPS } if (XdrvMailbox.command) ResponseCmndDone();