mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-12-25 17:17:54 +01:00
Use invert_colors and use_bgr in leak detector recipe (#1778)
This commit is contained in:
parent
a1d0f1bd26
commit
c9026d34e4
@ -251,16 +251,15 @@ ESPHome configuration
|
|||||||
id: font1
|
id: font1
|
||||||
size: 66
|
size: 66
|
||||||
|
|
||||||
# wonky color fix, in lieu of finding a way to invert the display
|
|
||||||
color:
|
color:
|
||||||
- id: color_wet
|
- id: color_wet
|
||||||
red: 100%
|
red: 100%
|
||||||
green: 100%
|
green: 0%
|
||||||
blue: 0%
|
blue: 0%
|
||||||
- id: color_dry
|
- id: color_dry
|
||||||
red: 100%
|
red: 0%
|
||||||
green: 0%
|
green: 100%
|
||||||
blue: 100%
|
blue: 0%
|
||||||
|
|
||||||
# built-in 80x160 TFT
|
# built-in 80x160 TFT
|
||||||
display:
|
display:
|
||||||
@ -274,14 +273,16 @@ ESPHome configuration
|
|||||||
cs_pin: GPIO5
|
cs_pin: GPIO5
|
||||||
dc_pin: GPIO23
|
dc_pin: GPIO23
|
||||||
reset_pin: GPIO18
|
reset_pin: GPIO18
|
||||||
|
invert_colors: true
|
||||||
|
use_bgr: true
|
||||||
lambda: |-
|
lambda: |-
|
||||||
if (id(leak).state) {
|
if (id(leak).state) {
|
||||||
it.fill(COLOR_ON);
|
it.fill(COLOR_OFF);
|
||||||
it.print(42, -24, id(font1), id(color_wet), TextAlign::TOP_CENTER, "W");
|
it.print(42, -24, id(font1), id(color_wet), TextAlign::TOP_CENTER, "W");
|
||||||
it.print(42, 32, id(font1), id(color_wet), TextAlign::TOP_CENTER, "E");
|
it.print(42, 32, id(font1), id(color_wet), TextAlign::TOP_CENTER, "E");
|
||||||
it.print(42, 85, id(font1), id(color_wet), TextAlign::TOP_CENTER, "T");
|
it.print(42, 85, id(font1), id(color_wet), TextAlign::TOP_CENTER, "T");
|
||||||
} else {
|
} else {
|
||||||
it.fill(COLOR_ON);
|
it.fill(COLOR_OFF);
|
||||||
it.print(42, -24, id(font1), id(color_dry), TextAlign::TOP_CENTER, "D");
|
it.print(42, -24, id(font1), id(color_dry), TextAlign::TOP_CENTER, "D");
|
||||||
it.print(42, 32, id(font1), id(color_dry), TextAlign::TOP_CENTER, "R");
|
it.print(42, 32, id(font1), id(color_dry), TextAlign::TOP_CENTER, "R");
|
||||||
it.print(42, 85, id(font1), id(color_dry), TextAlign::TOP_CENTER, "Y");
|
it.print(42, 85, id(font1), id(color_dry), TextAlign::TOP_CENTER, "Y");
|
||||||
|
Loading…
Reference in New Issue
Block a user