Seeking Assistance with Automation Configuration

Hello everyone, I’m reaching out to the community for some guidance on setting up an automation in Home Assistant. I’ve been trying to configure a simple system where a relay-controlled heater turns on when the temperature drops below 19°C and turns off when it rises above 20°C. The setup includes an ESPHome device with a temperature sensor and a relay, both of which are correctly integrated into Home Assistant. I can manually control the relay and view the temperature readings without any issues.

Despite the logical simplicity of the automation, it’s not functioning as expected. I’ve set up the automation using a numeric state trigger for both the temperature thresholds and included conditions to ensure the correct actions are taken. The automation also sends persistent notifications for debugging purposes, which I’ve been monitoring closely. However, the heater doesn’t respond to the temperature changes as intended.

I’ve reviewed the logs and configuration multiple times, but I can’t seem to identify where things are going wrong. I suspect there might be an issue with how the temperature data is being processed or how the automation is structured. I would greatly appreciate any advice or insights from someone who has successfully implemented a similar setup. Your expertise would be invaluable in helping me get this automation up and running smoothly. Thank you in advance for your time and assistance!