It is fine using timers in rules, but of course you need to manage them with thought.
This may be helpful. Remember your variable ‘timer’ is just a handle.
Personally, I would change the variable name from ‘timer’ to something more helpful like ‘modetimer’ before you write some other rule with timers and get mixed up.