lambda: |- const int l = ${line_height}; const auto d_unit = id(display_unit).state == "°F" ? "°F" : "°C"; const bool my_test = id(display_unit).state == "°F"; it.print(0, 0, id(font1), "temp"); it.printf(${col}, 0, id(font1), "%3.0f %2s", my_test ? id(calibrated_temp).state * (9.0/5.0) + 32.0 : id(calibrated_temp).state, d_unit); it.print(0, l, ${bold_line} == 2 ? id(font1b) : id(font1), "high"); it.printf(${col}, l, ${bold_line} == 2 ? id(font1b) : id(font1), "%3.0f %2s", my_test ? id(temp_high).state * (9.0/5.0) + 32.0 : id(temp_high).state, d_unit); it.print(0, l*2, ${bold_line} == 3 ? id(font1b) : id(font1), "low"); it.printf(${col}, l*2, ${bold_line} == 3 ? id(font1b) : id(font1), "%3.0f %2s", my_test ? id(temp_low).state * (9.0/5.0) + 32.0 : id(temp_low).state, d_unit); it.print(0, l*3, ${bold_line} == 4 ? id(font1b) : id(font1), "alarm"); it.printf(${col}, l*3, ${bold_line} == 4 ? id(font1b) : id(font1), "%s ", id(alarm_switch).state ? "ON" : "OFF");