I need your help

I want when it 8h to 20h, if Temp is less than 28°C, its set smart plug to ON, when it more than 28°C, it's set smart plug to OFF
Then
to 20h to 8h, if Temp is less than 23°C, its set smart plug to ON, when it more than 23°C, it's set smart plug to OFF
This is what I do but seem to not work, where I'm wrong please ?
Thanks