If it’s just this one thing you’re interested in then you can add a thing event directly in the GUI.
Maybe check the (deprecated) rule template from @rlkoshak here: template offline things. You can still use it or use a similar trigger in your code tab of your rule.