code: def on_switch_state_changed(
              self, func: Callable[['BaseUnit', SwitchNumber, Optional[bool]], None]):
          
          self._on_switch_state_changed = func
docs: Define the switch state changed callback implementation.
  
          Expected signature is:
              switch_state_changed_callback(base_unit, switch_number, state)
  
          base_unit:      the device instance for this callback
          switch_number:  the switch whose state has changed
          state:          True if switch turned on, or False if switch turned off