Changing the HA climate temparature attribute within ESPHome

As I mentioned in the title, I want to change the temperature on the HA dashboard climate card from within ESPHome, but I could not find a way to write data directly to the card. I was able to read the relevant value and print it on the LCD, but I want to change this value with the rotary encoder and reflect it on the dashboard. Briefly, what I want to do is:

- platform: homeassistant
    id: target_temp
    entity_id: climate.kombi_thermostat
    attribute: temperature

in the rotary encoder section;

id(target_temp).state = id(target_temp).state + 0.1;

but nothing changing either LCD nor dashboard…

As with your other thread, I assume climate.kombi_thermostat is a home assistant climate entity. If so, to change it with esphome you need to use a service as documented here.

The service you want is climate.set_temperature. See Climate - Home Assistant

Thank you for your answer.

If I use the ESPHOME climate, can I still add a card to the dashboard? I thought that I can access it from anywhere since the climate I am currently using is defined in configuration.YAML, but as I said, when I use ESPHOME climate, will I be able to use it in automation etc.?