Open close sensor in a Safe change the state manually

Hey everyone.

I have an open/close sensor (Tuya) in a safe which notifies my Tuya app every time the safe is opened which is great. Problem is when I close the safe, there isn’t enough signal to send the ‘Closed’ or ‘Off’ state in my case so HA never gets an update state to “Off”.

I am unable to write any automations as it seems as thought HA is not updating state to On if already On, well thats all I can assume.

Is there a way to change a physical open/close Tuya device state to Off (which I can do 2am ever day) so that I can get notifications from HA if the safe is opened.

Sorry, couldn’t find it for ages and made this post, but happened to stumble on it.

the fix is here - How to manually set state/value of sensor? - #3 by rodpayne