Distinguish between physical button press and switch.turn_on service call?

See this topic: