Need help with thermostat

I new to programming in webcore and need advise.
I have a thermostat the is giving heat to the bathroom floor.
Very simple scenario: When home mode is activated set temp to 23 degrees celicius. When the humidity is high set the temperature to 25 degrees celcius.

  1. It feels like the smartThings hub is slow after implementing the code, should i use a timer with intervall instead of checking criterias continiusly?
    2.Does the logic make sense?

You may want to post your webcore question on the webcore forum. Also, post an image of the piston so folks can see what you have done.