The thermostat doesn't know whether the heater is actually on or not, when
it re-engages heating mode. Tell it, otherwise it might leave the heating
on (or off) for ever.
       - switch.turn_on: ufh_relay
     idle_action:
       - switch.turn_off: ufh_relay
+    heat_mode:
+      - lambda: |-
+         // If the heater is already on, let the thermostat know. Otherwise it won't turn it off!
+         if (id(ufh_relay).state)
+           id(ntc_climate)->action = esphome::climate::CLIMATE_ACTION_HEATING;
+         else
+           id(ntc_climate)->action = esphome::climate::CLIMATE_ACTION_IDLE;
+         ESP_LOGD("ufh", "Start heating, current action %s", LOG_STR_ARG(climate_action_to_string(id(ntc_climate)->action)));
     on_control:
       - lambda: |-
            auto temp = x.get_target_temperature();