If i understand it correctly, you have two separate inputs in Home Assistant (magnet 1 & 2) and you want them to behave as one.
i think jou have to take at look at Template sensor intergration here you can create a separate sensor with for example three outputs calculated on de different inputs.