Looking for a name of a theory or reason behind a seeming cognitive mistake or error Setting: 
Bathroom, you've just brushed your teeth, turned the water on to let the remainder drift into the drain. After a moment you know there is something that needs to happen(obviously turning off the sink) but instead you flick the light switch off, for no apparent reason. 
I realize it's an odd situation but it can be compared to other events where there are multiple options for action and 'accidentally' choose the
 one you don't mean to.Question Would this be regarded as cognitive dissonance or is there a better name for this type of action? Thank you.
I think what you describe is a capture error.


  Capture errors refer to frequently performed tasks that take over the
  correct intended action. Wickens &amp; Hollands clearly define capture
  errors as resulting from two primary reasons: (1) the intended action
  and the resulted action share somewhat characteristics that are
  closely related: and (2) the action sequence is resulted from
  automated behaviour and therefore, not closely monitored by attention.
  The example stated earlier about pouring orange juice instead of milk
  is a capture error by itself.


You had the intention to close the sink, but instead you closed the light. Both actions share the characteristic of closing, closing the light is the most frequent.