Scene on the fly for KNX climate entities

Hi, I follow this tutorial:

to implement a climate switch off when a window is open.

So climate is a KNX thermostat, that have 4 preset modes: comfort, away, sleep and eco that are changed by other automation during the day.

The concept is:

  • window opening
  • scene on the fly
  • climate on eco (5°C frost protection)
  • window closing
  • reset climate to the prevoius preset mode

All works well until climate is on comfort preset. But KNX on other preset lower the temperature automaticaly:

  • comfort-1,5°C on away
  • comfort-5°C on sleep
  • fiexed 5°C on eco

For this when climate is on sleep for example 21 comfort-5 = 16°C on door closing happen this:
In the KNX bus I see restoring the sleep preset and a temperature write of 16°C that my actuator recalculate 16-5°=14 that is lower bound.

Is there a way to restore only preset and not writing any temperature.

For now I found a workaround. It seems work but I think that is not perfect.

Instead of creating a scene on the fly I save preset_mode attribute on an helper and then I restore it with: climate.set_preset_mode