I am following this example (Block Diagrams in TikZ) on how to put circuitikz elements inside a node box using \newcommand. The elements seems to be centered when outside the \newcommand, but when I tried using them inside a Tikz picture, the alignment was lost. How to I center align, both vertically and horizontally, the \newcommand elements (circuitikz) inside the rectangular node box. In the example I as following, the figures are neatly aligned inside the nodes. What am I missing? Thanks for the help.
Below is what I have so far.
% For drawing block diagrams, plotting, circuits, etc
\documentclass{beamer}
\usepackage{tikz}
\usepackage{circuitikz}
\usetikzlibrary{shapes, arrows, arrows.meta, positioning, calc, quotes, backgrounds, intersections, fit, matrix}
\usepackage{amsmath}
\begin{document}
\begin{frame}{Tikz picture inside a node}
\newcommand{\Sampler}{
\begin{circuitikz}
\draw (0,0) to [opening switch] (2.5,0);
\node (label) at (1.25, -0.4){$F_s=1\//T$};
\end{circuitikz}
}
% This is supposed to be inside the box
\begin{circuitikz}
\draw (0,0) to [opening switch] (2.5,0);
\node (label) at (1.25, -0.4){$F_s=1\//T$};
\end{circuitikz}
\qquad
% But when I use the \newcommand \Sampler, alignment is lost
\begin{tikzpicture}[auto, node distance=2cm,>=latex']
\coordinate (IN) at (0,0);
\node [draw, fill=blue!20, rectangle,
minimum height=1.5cm, minimum width=1.5cm, right = 2.0cm of IN, name=SAMP1]{\Sampler};
\coordinate[right = 2cm of SAMP1] (OUT);
\draw[->] (IN)node[left, align=left]{Analog\\signal} to node[midway]{$\scriptstyle x_a(t)$}(SAMP1);
\draw[->] (SAMP1) to node[midway]{$\scriptstyle x(n)\equiv x_a(nT)$} (OUT)node[right, align=left]{Discrete-time\\signal};
\end{tikzpicture}
\end{frame}
\end{document}