Temperature sensor and time range

Good evening, I would like to create a scene between 8 and 22 with a snzb-02d temperature sensor which, once it exceeds a certain level, turns on a socket where a dehumidifier is connected, while if it falls below another value, it turns off. the scene doesn’t work if i set the time range, while i put h24 it works fine. Some of you have made a scene similar to mine and it works fine, thanks to all who will help me understand my mistake and how to fix it.