The objective of this work is to establish the existence of entropy solutions to degenerate nonlinear elliptic problems for $L^1$-data $f$ with a Hardy potential, in weighted Sobolev spaces with variable exponent, which are represented as follows
\begin{gather*}
-\text{div}\big(\Phi(z,v,\nabla v)\big)+g(z,v,\nabla v)=f+\rho\frac{\vert v \vert^{p(z)-2}v}{|v|^{p(z)}},
\end{gather*}
where $-\text{div}(\Phi(z,v,\nabla v))$ is a Leray-Lions operator from $W_{0}^{1,p(z)}(\Omega,\omega)$ into its dual, $g(z,v,\nabla v)$ is a non-linearity term that only meets the growth condition, and $\rho>0$ is a constant.