HSA WITHDRAW

What happens if I withdraw money from my HSA for non-medical expenses, but then I deposit the same amount
example:

on feb 1 withdraw 1000

on July1 deposit 1000

will there be a penalty? if I spend the money on a TV.
is it just an example..