code: def _control(self, state):
          
  
          # Renew subscription if necessary
          if not self._subscription_is_recent():
              self._subscribe()
  
          cmd = MAGIC + CONTROL + self._mac + PADDING_1 + PADDING_2 + state
          _LOGGER.debug("Sending new state to %s: %s", self.host, ord(state))
          ack_state = self._udp_transact(cmd, self._control_resp, state)
          if ack_state is None:
              raise S20Exception(
                  "Device didn't acknowledge control request: {}".format(
                      self.host))
docs: Control device state.
  
          Possible states are ON or OFF.
  
          :param state: Switch to this state.