Yes, coffee grounds have a strong smell that can deter dogs from peeing. However, it is important to note that not all dogs are repelled by the smell of coffee. Use coffee grounds as a deterrent with caution, as they can be toxic if ingested.