Refactor measurement groups
Scans with measurement groups look for the counters in the setup_globals. It's a problem if the counter if not defined in the setup_globals.
Example: a wago with a key defined as a counter can be added to ACTIVE_MG but a ct scan will fail.
TEST_SESSION [159]: ACTIVE_MG.add(wago_simulator.esTr1)
TEST_SESSION [161]: ACTIVE_MG
Out [161]: MeasurementGroup: test_mg (state='default')
- Existing states : 'default'
Enabled Disabled
------- -------
diode
esTr1
TEST_SESSION [162]: ct(0.1)
!!! === ValueError: Missing counters, not in setup_globals: esTr1.
Note: if instead you do ACTIVE_MG.add(wago_simulator)
or ACTIVE_MG.add('wago_simulator.esTr1')
it works