Many thermostats have a 'mode' setting, switching between 'economy' and 'normal' modes. Both modes have their own setpoint, so you need to set the both temperatures only once, and you only switch the mode control from economy to normal and vice versa. This allows you to still adjust the 'normal' setpoint manually without having to re-code your script.
If your thermostat doesn't have such an economy mode, have a look at SVT, the
Smart Virtual Thermostat plugin. If you can switch your heating on and off from domoticz using for example a simple esp relay, use this plugin to replace your normal thermostat and most likely you'll get better comfort plus on top of that use less energy for heating your house.