Homematic IP via CCU + getting Week profiles

Hello everyone!

I’m currently struggling in making the heating controls more robust. My radiators are organised in groups in the Homematic CCU. I’m able to change the profile with the execution of

service: homematic.set_device_value
  data:
    address: INT0000002
    channel: 1
    param: ACTIVE_PROFILE
    value: 3
    value_type: int

Unfortunately that doesn’t work reliably. Sometimes this command just doesn’t seem to reach the valves. So is there maybe a way to determine the active profile? With that information I could construct a switch for each group or try to resend the command on failure.

Thanks in advance for any hints or help!

I recommend to switch to the new integration. It’s better in many ways, and also has better support for the week profiles.

Thank you really much! That works quite perfect! :partying_face:

For anyone trying to get a switch to toggle between two profiles (for me 1 is the normal one and 3 for vacation):

switch:
  - platform: template
    switches:
      vacation_schlafzimmer:
        friendly_name: Vacation Living Room
        value_template: "{{ is_state_attr('climate.living_room_1', 'preset_mode', 'week_program_3') }}"
        turn_on:
          service: climate.set_preset_mode
          target:
            entity_id: climate.living_room_1
          data:
            preset_mode: "week_program_3"
        turn_off:
          service: climate.set_preset_mode
          target:
            entity_id: climate.living_room_1
          data:
            preset_mode: "week_program_1"