I have followed below post to open and close minicart as per this post. Magento 2 Open minicart when item is added.
It is opening and closing perfectly. My issue is if I update minicart programmatically, Still minicart opens even if I haven't added prdouct to cart. Updating minicart programmatically as below:
How to open minicart only when item is added to cart ? e.g. I have one quickview extension installed, that trigger above event. So that time also minicart opens without/with product adding to cart.