def _transition_callback(self, is_on, transition):
<EOL>if transition.state_stages:<EOL><INDENT>state = transition.state_stages[transition.stage_index]<EOL>if self.is_on and is_on is False:<EOL><INDENT>state['<STR_LIT>'] = self.brightness<EOL><DEDENT>self.set(is_on=is_on, cancel_transition=False, **state)<EOL><DEDENT>self._active_transition = None<EOL>
Callback that is called when a transition has ended.

:param is_on: The on-off state to transition to.
:param transition: The transition that has ended.