Evohome and Homekit create switch

I got Evohome working in fine order, and also it shows in Apple-Home.
But from there, it is not possible to put Evohome manual on “Away”

I want to create a switch in home-assistant that represents and changes the setting of attribute “preset_mode” (away/Custom/eco/home/none)

Anybody know a way to accomplish this.

I tried creating a sensor, but than you cannot find it in homekit and not change any settings…

Did you ever find a solution to this? I have the same issue, but using Homekit with Ecobee thermostats.

Today I found a solution:

switch:
  - platform: template
    switches:
      heating_away:
        friendly_name: "Heating on away"
        value_template: "{{ is_state_attr('climate.home_evohome', 'preset_mode', 'away') }}"
        turn_on:
          service: climate.set_preset_mode
          data:
            entity_id: climate.home_evohome
            preset_mode: away
        turn_off:
          service: climate.set_preset_mode
          data:
            entity_id: climate.home_evohome                                   
            preset_mode: none
1 Like