Point taken. But I don't think going bareheaded can be compared with smoking in someone's home. It won't make you sick.
The point is, if it is your house, I should respect your rules even if I don't agree with them. If I feel so strongly about your rules that I just CAN'T respect them, then I should politely decline to go.