POPUP Card closing

Hi Every One,
I Have a POPUPCARD with a big flashing red icon on my main Tablet that warning me when the Home’s door is open for more then 5 minute, better, warning me when magnetic door sensor is open for more the 5 minute.
I would like that, if door sensor is closes the popup card disappear by itself.
I tried to swap the “button” of popup card with a boolean input, linking that to the sensor ed hoping that if i “turn OFF” boolean, POPUP Disappear , but i m going wrong. Can Anyone suggest me the right way in order to reach the result?

Which “popup card” do you have? (i can’t find “popup card” in HACS).
If it’s browser mod’s one you have service, called “browser_mod.popup_close”

Yes is Browser Mod… so, you mean i call a service by an automation?

Yep. And if you want only specific device to be closed just define it. Hint: use developer tools → services for knowhow: select service and device in UI mode, then click on YAML mode to see actual commands.

thank u might… how do i flag as solved your reply?

Hm…you should have “mark as solution” (or similar) under the answer, just click on it.