I do have a UPS connected via USB, and my Mac occasionally mistakes the UPS's self-test cycle as a running-on-battery event. I have the auto UPS shutdown set to a longer interval, so theoretically it shouldn't be an issue, but I've disconnected it to see if that solves the problem.
Other unusual devices are third party RAM, a WD USB 3.1 SSD, a 21" Apple Studio Display via third party DVI to Thunderbolt 3 adapter, and two hubs. I'll start yanking it all if disconnecting the UPS doesn't do it...
Hardware Overview:
Model Name: iMac
Model Identifier: iMac19,1
Processor Name: Intel Core i5
Processor Speed: 3.7 GHz
Number of Processors: 1
Total Number of Cores: 6
L2 Cache (per Core): 256 KB
L3 Cache: 9 MB
Memory: 16 GB
Boot ROM Version: 220.270.93.0.0
SMC Version (system): 2.46f12
Serial Number (system): D25YX154JV40
Hardware UUID: 156C5900-68DA-5E96-94A9-F05006CF04E8