Browse Source

tune display

esphome
Hendrik Langer 3 years ago
parent
commit
7a23bbd61d
  1. 8
      common/display.yaml

8
common/display.yaml

@ -3,7 +3,7 @@ font:
- file: 'fonts/Vera.ttf'
id: font1
size: 10
glyphs: '!"%()[]+=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz/²³µΩ'
glyphs: '!"%()+=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz/²³µΩ€[]?'
- file: 'fonts/Vera.ttf'
id: font2
size: 20
@ -96,7 +96,7 @@ display:
it.line(115, 42, 145, 42);
it.filled_rectangle(130-10, 21, 20, 10, COLOR_OFF);
it.print(130, 26, id(font1), TextAlign::CENTER, "WZ");
if (id(iaq_accuracy_wz).state == 3) {
if (id(iaq_accuracy_wz).state >= 2) {
it.printf(130, 41, id(font1), "%.0f ", id(iaq_wz).state);
if (id(iaq_wz).state < 50) {
it.printf(130, 43, id(font1), TextAlign::TOP_CENTER, "excellent");
@ -120,7 +120,7 @@ display:
it.line(160, 42, 190, 42);
it.filled_rectangle(175-10, 21, 20, 10, COLOR_OFF);
it.print(175, 26, id(font1), TextAlign::CENTER, "SZ");
if (id(iaq_accuracy_sz).state == 3) {
if (id(iaq_accuracy_sz).state >= 2) {
it.printf(175, 41, id(font1), "%.0f ", id(iaq_sz).state);
if (id(iaq_sz).state < 50) {
it.printf(175, 43, id(font1), TextAlign::TOP_CENTER, "excellent");
@ -155,6 +155,8 @@ display:
it.print(184, 105, id(font1), "Springer");
if (id(battery_springer).state >=0 && id(battery_springer).state <= 100) {
it.printf(248, 105, id(font1), TextAlign::TOP_RIGHT, "%.0f%%", id(battery_springer).state);
} else {
it.printf(248, 105, id(font1), TextAlign::TOP_RIGHT, "nc");
}
it.printf(184,115, id(font1), "%.1f°C, %.1f%%H, %.0fhPa", id(temperature_springer).state, id(humidity_springer).state, id(pressure_springer).state);
interval:

Loading…
Cancel
Save