I am building a weather display using ESPhome, a Wemos D1 Mini, and an ST7735 display. The issue I am having is it seems the drivers are not creating accurate RGB colors. Reds look more magenta, Yellows look white, Blues seem to be the only one that look correct. I came across this error when trying to display this image for a partly cloudy sky and the sun looked white.
I have tried everything I could think of from using different pins, swapped out the display as I have two, messed with the percentages under “color” to see if I could get yellow text. Turned on and off the eight_bit_color option.
Here is the code I am using, note the board I have is Red board the display only seems to work when I select one of the black tab options. Any help would be greatly appreciated, thanks.
# Example configuration entry for ESP8266
i2c:
spi:
clk_pin: D5
mosi_pin: D7
color:
- id: color_blue
red: 0%
green: 0%
blue: 100%
white: 0%
- id: color_yellow
red: 100%
green: 100%
blue: 0%
white: 0%
- id: color_red
red: 100%
green: 0%
blue: 0%
white: 0%
image:
- file: "weather-icons/cloudy.png"
id: cloudy
type: RGB24
- file: "weather-icons/partlycloudy.png"
id: partlycloudy
type: RGB24
display:
- platform: st7735
model: "INITR_18BLACKTAB"
reset_pin: D3
cs_pin: D8
dc_pin: D4
rotation: 90
device_width: 128
device_height: 160
col_start: 0
row_start: 0
eight_bit_color: true
update_interval: 5s
lambda: |-
// Draw the image my_image at position [x=0,y=0]
if (id(weather_condition).state == "cloudy") {
it.image(0, 0, id(cloudy));
}
if (id(weather_condition).state == "partlycloudy") {
it.image(0, 0, id(partlycloudy));
}