My first custom switch

Hi all
i’m trying to make a switch that can turn on or off my heating and set a desired temperature.
But whatever I try I don’t seem to fully understand what I’m doing wrong.
Could anyone have a quick look at my yaml? thanks!

  - platform: template
    switches:
      lyric_t6:
        value_template: "{{ is_state('climate.lyric_t6', 'heat') }}"
        turn_on:
          service: climate.temperature
          data:
            entity_id: climate.lyric_t6
            operation_mode: heat
            temperature: 21
        turn_off:
          service: climate.temperature
          data:
            entity_id: climate.lyric_t6
            operation_mode: off
            temperature: 16
        icon_template: >-
          {% if is_state('climate.lyric_t6', 'heat') %}
            mdi:fire
          {% else %}
            mdi:radiator-off
          {% endif %}

The correct service is climate.set_temperature, not climate.temperature
That’s probably why :slight_smile:

1 Like

Oh god, :blush:
I’ll give that a shot. Thanks!

I think it works but i get a 500 server error again… happens so much with this lyric t6 :frowning:
Might invest in another one that has a more reliable connection.

EDIT: found a solution, i used the homekit fix for this

https://community.home-assistant.io/t/honeywell-lyric-thermostat-with-homekit-controller/60445/7