Yes, dogs find the smell of chili irritating and will avoid peeing in areas where it is present. However, it is important not to spray chili directly on a dog.