that would work. depends on the conditions however. If the device is working in a place like a kitchen with a lot of light, the photodiode might not be reliable.
EDIT: i also realized: the photodiode will also be a somewhat clunkier looking solution, because the easy way to attach the photodiode would result in probably a poor looking job of taping/gluing. and if you were to isolate the diode, such as using black silicone, it would look bad.
i know id rather of a wire coming out of my appliance, as opposed to glue, but thats me