corrected active_PUs logic

This commit is contained in:
Etienne Chassaing 2025-08-04 15:58:25 +02:00
parent 6587851267
commit 9e5e4c2a70

View File

@ -225,7 +225,7 @@ def get_pu_status():
}
logging.info(f"[PU STATUS] {states}")
active_PUs = [pu for pu, status in states.items() if status != 'OFF']
active_PUs = [index + 1 for index, (pu, status) in enumerate(states.items()) if status != 'Offline']
logging.info(f"[ACTIVE PU] {active_PUs}")
return JSONResponse(content=states)