Know better than (to do something)

To be smart enough not to do something.

I told my friend that she should know better than to phone me at 7:00 AM on a Saturday morning.