OK, I understand. So, the “new generation” devices (the ones with the integrated battery) run under the same Bluetooth key (or node), while the older ones have separate keys.
Here is a slightly streamlined version of your macro:
Mouse & Keyboard Battery Charge Level Warning (Newer Devices).kmmacros (4.9 KB)
I couldn’t test it with real shell output, since I only have one new-generation device. But if your macro has worked for you then this should work too.