SSD1306 cannot set text color

I’m trying to change the text color based on a sensor value but it just displays everything in white color.
Can anyone see if I’m doing something wrong?

  - platform: ssd1306_i2c
    model: "SH1106 128x64"
    address: 0x3C
    lambda: |-
      it.printf(0, 0, id(calibri), "Solar Generation: %s", id(current_solar_generation).state.c_str());
      it.printf(0, 13, id(calibri), "Battery SOC: %s", id(solar_battery_soc).state.c_str());
      it.printf(0, 26, id(calibri), "Battery Power: %s", id(solar_battery_power).state.c_str());
      it.printf(0, 39, id(calibri), "House Load: %s", id(current_house_consumption).state.c_str());
      if (id(grid_status).state == "Exporting") {
        it.printf(0, 52, id(calibri), id(light_green), "Exporting: %s", id(current_grid_power).state.c_str());
      else {
        it.printf(0, 52, id(calibri), id(light_red), "Importing: %s", id(current_grid_power).state.c_str());

  - file: 'calibri.ttf'
    id: calibri
    size: 12

  - id: light_red
    red: 100%
    green: 20%
    blue: 25%
    white: 0%
  - id: light_green
    red: 0%
    green: 100%
    blue: 25%
    white: 0%

My impression was that the SSD1306 component did not support colour.

Right. The ssd1306 is a monochrome device.

That is correct, I dug up the specs and yes, white only. Thought it was color but I just had this laying around for a long time and decided to put it to use now :slight_smile: