I think you want Home Assistant. Now we ask, which thermostats let Home Assistant program them without cloud connectivity? I have no idea, but last time I looked, it was a rabbit hole.
GoControl has a zwave thermostat that works well. Has no smarts of it's own (behaves like a pretty standard thermostat with heat, cool, and fan settings) but can be changed via home assistant so I've written a pretty extensive algorithm to meet my needs.
I have two of these (for separate HVAC systems on top and bottom floors of my house) and can highly recommend
The killer feature of Home Assistant vs. my previous Nest setup came when I added door and window sensors, and programmed HA to pause heating/AC whenever doors or windows are open. I no longer turn into my father, who I remember shouting at us kids, "close the door, I'm not paying to air condition the outside!"