Thermostat always turning on for a second

Hi guys,
I created a generic thermostat for the first time. I’m using a relay connected to an ESP-01s for the switch, and a Xiaomi Sensor for the temperature.
It is working very good, but the only problem is, that the the relay is going on for a second every 10-15mins. This looks like that then:
Bildschirmfoto 2020-02-07 um 14.04.05

I turned off the “keep_alive” variable, so I don’t believe that this is the problem. Here is my config:

climate:
  - platform: generic_thermostat
    name: Hanas Zimmer
    heater: switch.relay
    target_sensor: sensor.hanas_zimmer
    min_temp: 14
    max_temp: 26
    ac_mode: false
    target_temp: 19
    cold_tolerance: 0.5
    hot_tolerance: 0
    min_cycle_duration:
      seconds: 5
#    keep_alive:
#      minutes: 3
    initial_hvac_mode: "heat"
    away_temp: 19
    precision: 0.1

Any suggestions?

I would say, use bigger values for cold and hot_tolerance.
Why hot_tolerance: 0 ?

The Problem is, that the room isn’t reaching the target temp. My target temp is set to 19 degrees. But the room temperature is 21 degrees. I would believe that the tolerance is the reason for this behavior, but since it isn’t near the target temp, I would say that we can exclude this…

or am I maybe misunderstanding something?

Btw. I found the reason: My ESP-01s, wich was flashed with ESPHome, had a broken configuration. After changing the config everything is working as expected. Thanks!