Value Template from HA Website

Cheers guys I got it working with your help.

To fire boiler -

  - platform: template
    value_template: >-
      {{ state_attr('climate.bathroom','current_temperature') -
      state_attr('climate.bathroom','temperature') < 0.5 }}

To turn boiler off -

  - platform: template
    value_template: >-
      {{ state_attr('climate.bathroom','current_temperature') -
      state_attr('climate.bathroom','temperature') > 0.5 }}