0

For example, to increase/decrease a thermostat temperature using 2 buttons, I have to read the current value, add (or subtract) 0.1°, then update the setting.

The question is how to do it with and (if possible) without Esphome's lambdas.

fdb
  • 1,998
  • 1
  • 19
  • 20

1 Answers1

1

I only managed to do it this way:

on_press:
  - lambda: !lambda |-
      id(_thermostat).target_temperature += .5;
      ESP_LOGI("main", "target_temperature: %f", id(_thermostat).target_temperature);
fdb
  • 1,998
  • 1
  • 19
  • 20