As ever if you don’t supply the info you will not get a decent response.
You will need to show us your yaml config, wiring diagram etc, and no doubt it will be easy to fix.