Fixed it! With the custom state-switch card
For future reference, the IPMA integration already provides this information