ESP mit DHT und Display, Jemand Ideen?

Hallo Zusammen,
möchte mir mit nem ESP8266, einem DHT und einem Display eine Raumklimaanzeige bauen.
Zusätzlich möchte ich noch ein oder zwei Entitäten aus HA auf dem Display anzeigen.
Das Display soll auch auf größere Distanz lesbar sein. Dachte so an 10-15mm Ziffernhöhe.
Das 8x32 RGB ist mir aber zu groß und braucht mir auch zu viel Energie.
Ob die Werte gleichzeitig oder nacheinander angezeigt werden, wäre mir erst mal egal.

Hat Jemand eine Idee dazu oder schon ein fertiges Projekt?

Vielen Dank!

Vielleicht wäre das etwas für dich.

Danke, das schaue ich mir an.

Brauche ich dafür eine ESP32 oder reicht ein 8266?

Hmm, gute Frage. Keine Ahnung bin da irgendwann mal drüber gestolpert.
Mal im Discord bei SmartHome Yourself nachfragen.

Steht doch im Codebeispiel :wink:

esphome:
  name: touchdisplay
  platform: ESP32
  board: nodemcu-32s
  platformio_options:
    upload_speed: 921600
    monitor_speed: 115200
........

Da steht das die einen ESP32 benutzt haben. Aber das heißt ja nicht das es nur mit dem geht, oder?

Könnte sein, dass es mit einem 8266 auch geht, aber wenn die Touchfunktion des Displays genutzt wird, brauchst du auf alle Fälle den ESP32.

Touch brauche ich nicht.
Ich teste es mal mit nem 8266. Habe ich noch liegen. Zur Not muss ich nen 32er besorgen.

Hey,
so was hab ich vor kurzem auch in Erwägung gezogen, aber ich wollte vielleicht sogar ein Nextion-Display verwenden. Aber ich bin über das Youtube Video auf das Sonoff NSPanel gekommen, ist ein RGB Touchdisplay mit eigenem µC, zusätzlich ein ESP8266 und 2 separate Taster.

Der ESP und auch das Display sind flashbar und es gibt Custom Firmware dafür, ich glaube mit Tamota, danach sollte es individuell programmierbar sein. Werksseitig hat es auf der Rückseite noch ein Anhängsel für die Stromversorgung und Doppelrelais für 2 Verbraucher, den Kasten wollte ich mir eigentlich sparen und stattdessen die GPIO für einen Sensor (T/H) und einen Akku inkl. Ladeschaltung “anbauen”. Das ganze soll über die 8 Pins an der Rückseite verbunden werden und in einem gedruckten Gehäuse untergebracht werden, ggf. mit Magnethalterung um es Mobil zu machen. :wink:

Hallo @haemmerl,
lass Dich nicht verwirren.
In der Regel ist vollkommen egal, ob ESP8266 oder ESP32.
Es muss einfach die Schnittstelle des Displays vom jeweiligen ESP ansprechbar sein.
Nimm ein Display mit I2C Schnittstelle, wenig Verdrahtung, können beide ESP ohne Probleme und es gibt ein große Auswahl an Displays, dann schau hier www.esphome.io mit dem Suchbegriff “Display” nach dem passenden Treiber.

Wie wäre es mit OLED 1,3" ?

Gruß
Frank

Ich teste jetzt erstmal das oben erwähnte Display.
Das NSPanel hatte ich auch schon mal im Auge. Wusste aber nicht das man da noch einen zusätzlichen Sensor anschließen kann. Wie geht das?
Da ich für Display + ESP32 + DHT auch noch ein Gehäuse brauche, ist es evtl auch nicht viel günstiger als ein NSPanel.

Ich weiß über das verlinkte YT erstmal auch nur welche Kontakte man zum Flashen braucht und wo auf dem 8 Pin (2x4) Anschluss 5V und GND sind, mehr aber noch nicht. Ich habe grad beide Platinen offen vor mir liegen, Das Display kann definitiv 2 Relais (in der Trafoeinheit enthalten) ansteuern und die Pins am 8 Pin Anschluss heißen (Oben/unten links->rechts):
RY3 - RY2 - RY1 - BZ
[TP7 - GND] - [5V - TP1]

Die Kontakte in sind verbunden und die 5V ist die Stromversorgung für das Display. Ob die oberen 4 Pins zweckentfremdet werden können, versuche ich noch rauszufinden, aber ohne die Trafoeinheit anzuschließen. Da der ESP frei programmierbar sein soll, wird man sicher auch Einfluss auf den Zustand Pins (In/Out) haben.

So, das Display funktioniert so weit.


Hab nur noch nicht raus bekommen wie ich das Prozentzeichen anzeigen kann. Nimmt er nicht. Wahrscheinlich weil das auch als Steuerzeichen genutzt wird.
Weiß Jemand wie das geht?

Glückwunsch zum Display …

 it.printf(90, 16, id(my_font_K),"%.0f %%", id(wifi_signal_p).state);
        
       # % ist ein Format Zeichen, das %% bringt ein "%" auf das Display!

Gruß
Frank

Danke, das war zu einfach!

Schau dir mal das Projekt openhasp an. Ich nutze das mit diversen Displays.

Hallo, wie sieht Dein Quellcode aus?

Ist bestimmt nicht perfekt, aber er hier ist er:

esphome:
  name: display-wz
  friendly_name: Display WZ
  platform: ESP32
  board: esp32dev

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "xxx"

ota:
  platform: esphome
  password: "xxx"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Display-Wz Fallback Hotspot"
    password: "rfwFiwU89cpd"

captive_portal:
    
sensor:
  - platform: dht
    pin: 32
    temperature:
      name: "temp_wz"
      id: temp_wz
      filters:
        - offset: -2.3
    humidity:
      name: "hum_wz"
      id: hum_wz
      filters:
        - offset: 10
    update_interval: 60s

  - platform: homeassistant
    id: temp_aussen
    entity_id: sensor.aussentemperatur_nordseite

  - platform: homeassistant
    id: hum_aussen
    entity_id: sensor.luftdata_humidity

  - platform: homeassistant
    id: pres_aussen
    entity_id: sensor.luftdata_pressure
 
  - platform: homeassistant
    id: ha_power
    entity_id: sensor.power_shm2

  - platform: homeassistant
    id: pv_power
    entity_id: sensor.power_pv_summe

  - platform: homeassistant
    id: pv_an_Pdc_ost
    entity_id: sensor.stp5000se_dc_leistung_b_template

  - platform: homeassistant
    id: pv_an_Pdc_west
    entity_id: sensor.stp5000se_dc_leistung_a_template

  - platform: homeassistant
    id: pv_an_tagesertrag
    entity_id: sensor.stp5000se_pv_tagesertrag

  - platform: homeassistant
    id: heiz_vl
    entity_id: sensor.temperature_4

  - platform: homeassistant
    id: heiz_rl
    entity_id: sensor.temperature_5

  - platform: homeassistant
    id: ww_vl
    entity_id: sensor.temperature_2

  - platform: homeassistant
    id: ww_rl
    entity_id: sensor.temperature_3    

  - platform: homeassistant
    id: solar_vl
    entity_id: sensor.solar_vorlauf_2

  - platform: homeassistant
    id: solar_rl
    entity_id: sensor.solar_rucklauf

  - platform: homeassistant
    id: pv_alt_Pdc_ost
    entity_id: sensor.stp5000tl20_dc_leistung_b_template

  - platform: homeassistant
    id: pv_alt_Pdc_west
    entity_id: sensor.stp5000tl20_dc_leistung_a_template

  - platform: homeassistant
    id: pv_alt_tagesertrag
    entity_id: sensor.stp5000tl20_pv_tagesertrag

  - platform: homeassistant
    id: akku_power
    entity_id: sensor.power_batterie

  - platform: homeassistant
    id: akku_ladezustand
    entity_id: sensor.stp5000se_aktueller_batterieladezustand

  - platform: homeassistant
    id: power_wp
    entity_id: sensor.aktuelle_leistung_warmepumpe

  - platform: homeassistant
    id: energy_wp_day
    entity_id: sensor.heizstromzahler_taglich  

  - platform: homeassistant
    id: co2wz
    entity_id: sensor.co2_wz_mh_z19_co2_value

  - platform: homeassistant
    id: co2sz
    entity_id: sensor.co2_sz_mh_z19_co2_value

  - platform: homeassistant
    id: co2buro
    entity_id: sensor.co2_buro_mh_z19_co2_value

  - platform: homeassistant
    id: pv_gar_Pdc
    entity_id: sensor.sb36_1av41_dc_leistung_a_template

  - platform: homeassistant
    id: pv_gar_tagesertrag
    entity_id: sensor.sb36_1av41_pv_tagesertrag

  - platform: homeassistant
    id: pv_fas_Pdc_oben
    entity_id: sensor.wechselrichter_port_1_dc_leistung

  - platform: homeassistant
    id: pv_fas_Pdc_unten
    entity_id: sensor.wechselrichter_port_2_dc_leistung

  - platform: homeassistant
    id: pv_fas_tagesertrag
    entity_id: sensor.strom_fassade_heute_wh

time:
  - platform: homeassistant
    id: homeassistant_time   
      
font:
  - file: 'Roboto-Regular.ttf'
    id: font1
    size: 65
    glyphs:
      ['&', '@', '!', ',', '.', '?', '"', '%', '(', ')', '+', '-', '_', ':', '°', '0',
       '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E',
       'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
       'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
       'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
       'u', 'v', 'w', 'x', 'y', 'z','å', 'Ä', 'ä', 'Ö', 'ö', 'Ü', 'ü', '/', 'ß']

  - file: 'Roboto-Regular.ttf'
    id: font2
    size: 35
    glyphs:
      ['&', '@', '!', ',', '.', '?', '"', '%', '(', ')', '+', '-', '_', ':', '°', '0',
       '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E',
       'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
       'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
       'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
       'u', 'v', 'w', 'x', 'y', 'z','å', 'Ä', 'ä', 'Ö', 'ö', 'Ü', 'ü', '/', 'ß']

  - file: 'Roboto-Regular.ttf'
    id: font3
    size: 60
    glyphs:
      ['&', '@', '!', ',', '.', '?', '"', '%', '(', ')', '+', '-', '_', ':', '°', '0',
       '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E',
       'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
       'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
       'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
       'u', 'v', 'w', 'x', 'y', 'z','å', 'Ä', 'ä', 'Ö', 'ö', 'Ü', 'ü', '/', 'ß']

  - file: 'Roboto-Regular.ttf'
    id: font4
    size: 25
    glyphs:
      ['&', '@', '!', ',', '.', '?', '"', '%', '(', ')', '+', '-', '_', ':', '°', '0',
       '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E',
       'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
       'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
       'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
       'u', 'v', 'w', 'x', 'y', 'z','å', 'Ä', 'ä', 'Ö', 'ö', 'Ü', 'ü', '/', 'ß']

  - file: 'Roboto-Regular.ttf'
    id: font5
    size: 50
    glyphs:
      ['&', '@', '!', ',', '.', '?', '"', '%', '(', ')', '+', '-', '_', ':', '°', '0',
       '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E',
       'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
       'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
       'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
       'u', 'v', 'w', 'x', 'y', 'z','å', 'Ä', 'ä', 'Ö', 'ö', 'Ü', 'ü', '/', 'ß']

  - file: 'Roboto-Regular.ttf'
    id: font6
    size: 40
    glyphs:
      ['&', '@', '!', ',', '.', '?', '"', '%', '(', ')', '+', '-', '_', ':', '°', '0',
       '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E',
       'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
       'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
       'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
       'u', 'v', 'w', 'x', 'y', 'z','å', 'Ä', 'ä', 'Ö', 'ö', 'Ü', 'ü', '/', 'ß']

  - file: 'Roboto-Regular.ttf'
    id: font7
    size: 80
    glyphs:
      ['&', '@', '!', ',', '.', '?', '"', '%', '(', ')', '+', '-', '_', ':', '°', '0',
       '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E',
       'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
       'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
       'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
       'u', 'v', 'w', 'x', 'y', 'z','å', 'Ä', 'ä', 'Ö', 'ö', 'Ü', 'ü', '/', 'ß']
color:
  - id: my_red
    red: 100%
    green: 0%
    blue: 0%
  - id: my_green
    red: 0%
    green: 100%
    blue: 0%
  - id: my_blue
    red: 0%
    green: 0%
    blue: 100%
  - id: my_turkis
    red: 5%
    green: 50%
    blue: 80%
  - id: my_yellow
    red: 100%
    green: 100%
    blue: 0%

interval:
  - interval: 5s
    then:
      - display.page.show_next: my_display
      - component.update: my_display

display:
  - platform: ili9xxx
    model: TFT_2.4
    id: my_display
    cs_pin: 5
    dc_pin: 4
    #led_pin: 15
    reset_pin: 22
    rotation: 180
    invert_colors: false
    pages:
      - id: page1
        lambda: |-
          it.printf(2, 0, id(font2), "Innen:");
          it.strftime(145, 0, id(font2), "%H:%M", id(homeassistant_time).now());
          it.printf(230, 30, id(font1), TextAlign::TOP_RIGHT, "%.1f°C", id(temp_wz).state);
          it.printf(215, 85, id(font1), TextAlign::TOP_RIGHT, "%.0f%%", id(hum_wz).state);
          it.printf(2, 155, id(font2), "Außen:");
          it.printf(230, 185, id(font1), TextAlign::TOP_RIGHT, "%.1f°C", id(temp_aussen).state);
          it.printf(215, 240, id(font1), TextAlign::TOP_RIGHT, "%.0f%%", id(hum_aussen).state);
      - id: page2
        lambda: |-          
          it.printf(2, 0, id(font2), "CO2");            
          it.strftime(145, 0, id(font2), "%H:%M", id(homeassistant_time).now());   
          it.printf(2, 30, id(font2), "Wohnzimmer:");    
          if (id(co2wz).state > 1500) {
            it.printf(230, 60, id(font1), my_red, TextAlign::TOP_RIGHT, "%.2f%%", (id(co2wz).state) / 1000);
          }  
          if ((id(co2wz).state < 1500) && (id(co2wz).state > 800)) {
            it.printf(230, 60, id(font1), my_yellow, TextAlign::TOP_RIGHT, "%.2f%%", (id(co2wz).state) / 1000);
          }  
          if (id(co2wz).state < 800) {
            it.printf(230, 60, id(font1), my_green, TextAlign::TOP_RIGHT, "%.2f%%", (id(co2wz).state) / 1000);
          }              
          it.printf(2, 125, id(font2), "Schlafzimmer:");    
          if (id(co2sz).state > 1500) {
            it.printf(230, 155, id(font1), my_red, TextAlign::TOP_RIGHT, "%.2f%%", (id(co2sz).state) / 1000);
          }  
          if ((id(co2sz).state < 1500) && (id(co2sz).state > 800)) {
            it.printf(230, 155, id(font1), my_yellow, TextAlign::TOP_RIGHT, "%.2f%%", (id(co2sz).state) / 1000);
          }  
          if (id(co2sz).state < 800) {
            it.printf(230, 155, id(font1), my_green, TextAlign::TOP_RIGHT, "%.2f%%", (id(co2sz).state) / 1000);
          }           
          it.printf(2, 220, id(font2), "Büro:");    
          if (id(co2buro).state > 1500) {
            it.printf(230, 250, id(font1), my_red, TextAlign::TOP_RIGHT, "%.2f%%", (id(co2buro).state) / 1000);
          }  
          if ((id(co2buro).state < 1500) && (id(co2buro).state > 800)) {
            it.printf(230, 250, id(font1), my_yellow, TextAlign::TOP_RIGHT, "%.2f%%", (id(co2buro).state) / 1000);
          }  
          if (id(co2buro).state < 800) {
            it.printf(230, 250, id(font1), my_green, TextAlign::TOP_RIGHT, "%.2f%%", (id(co2buro).state) / 1000);
          }                  
      - id: page3
        lambda: |-
          it.printf(2, 0, id(font2), "Panschluss:");
          if (id(ha_power).state > 500) {
            it.printf(230, 30, id(font3), my_red, TextAlign::TOP_RIGHT, "%.0f W", id(ha_power).state); 
          }  
          if ((id(ha_power).state < 501) && (id(ha_power).state > -501)) {
            it.printf(230, 30, id(font3), my_yellow, TextAlign::TOP_RIGHT, "%.0f W", id(ha_power).state);
          }  
          if (id(ha_power).state < -500) {
            it.printf(230, 30, id(font3), my_green, TextAlign::TOP_RIGHT, "%.0f W", id(ha_power).state);
          }  
          it.printf(2, 90, id(font2), "Ppv:");

          if (id(pv_power).state < 500) {
            it.printf(230, 125, id(font3), my_red, TextAlign::TOP_RIGHT, "%.0f W", id(pv_power).state); 
          }  
          if ((id(pv_power).state > 501) && (id(pv_power).state < 1501)) {
            it.printf(230, 125, id(font3), my_yellow, TextAlign::TOP_RIGHT, "%.0f W", id(pv_power).state);
          }  
          if (id(pv_power).state > 1500) {
            it.printf(230, 125, id(font3), my_green, TextAlign::TOP_RIGHT, "%.0f W", id(pv_power).state);
          }  
          it.printf(2, 185, id(font2), "Akku:");
          if (id(akku_power).state < -500) {
            it.printf(230, 210, id(font3), my_red, TextAlign::TOP_RIGHT, "%.0f W", id(akku_power).state); 
          }  
          if ((id(akku_power).state > -501) && (id(akku_power).state < 1501)) {
            it.printf(230, 210, id(font3), my_yellow, TextAlign::TOP_RIGHT, "%.0f W", id(akku_power).state);
          }  
          if (id(akku_power).state > 1500) {
            it.printf(230, 210, id(font3), my_green, TextAlign::TOP_RIGHT, "%.0f W", id(akku_power).state);
          }  
          if (id(akku_ladezustand).state < 34) {
            it.printf(230, 260, id(font3), my_red, TextAlign::TOP_RIGHT, "%.0f %%", id(akku_ladezustand).state); 
          }  
          if ((id(akku_ladezustand).state > 33) && (id(akku_ladezustand).state < 67)) {
            it.printf(230, 260, id(font3), my_yellow, TextAlign::TOP_RIGHT, "%.0f %%", id(akku_ladezustand).state);
          }  
          if (id(akku_ladezustand).state > 66) {
            it.printf(230, 260, id(font3), my_green, TextAlign::TOP_RIGHT, "%.0f %%", id(akku_ladezustand).state);
          }  
      - id: page4
        lambda: |-
          it.printf(2, 2, id(font2), "PV Altbau");        
          it.printf(2, 40, id(font2), "Pdc Ost:");
          it.printf(215, 70, id(font3), TextAlign::TOP_RIGHT, "%.0f W", id(pv_alt_Pdc_ost).state);
          it.printf(2, 130, id(font2), "Pdc West:");
          it.printf(215, 160, id(font3), TextAlign::TOP_RIGHT, "%.0f W", id(pv_alt_Pdc_west).state);
          it.printf(2, 220, id(font2), "Tagesertrag:");
          it.printf(235, 255, id(font5), TextAlign::TOP_RIGHT, "%.0f Wh", id(pv_alt_tagesertrag).state);
      - id: page5
        lambda: |-
          it.printf(2, 2, id(font2), "PV Anbau");      
          it.printf(2, 40, id(font2), "Pdc Ost:");
          it.printf(215, 70, id(font3), TextAlign::TOP_RIGHT, "%.0f W", id(pv_an_Pdc_ost).state);
          it.printf(2, 130, id(font2), "Pdc West:");
          it.printf(215, 160, id(font3), TextAlign::TOP_RIGHT, "%.0f W", id(pv_an_Pdc_west).state);
          it.printf(2, 220, id(font2), "Tagesertrag:");
          it.printf(235, 255, id(font5), TextAlign::TOP_RIGHT, "%.0f Wh", id(pv_an_tagesertrag).state);
      - id: page6
        lambda: |-
          it.printf(2, 2, id(font2), "PV Garage");      
          it.printf(2, 40, id(font2), "Pdc:");
          it.printf(215, 70, id(font3), TextAlign::TOP_RIGHT, "%.0f W", id(pv_gar_Pdc).state);
          it.printf(2, 130, id(font2), "Tagesertrag:");
          it.printf(235, 160, id(font5), TextAlign::TOP_RIGHT, "%.0f Wh", id(pv_gar_tagesertrag).state);          
      - id: page7
        lambda: |-
          it.printf(2, 2, id(font2), "PV Fassade");      
          it.printf(2, 40, id(font2), "Pdc Oben:");
          it.printf(215, 70, id(font3), TextAlign::TOP_RIGHT, "%.0f W", id(pv_fas_Pdc_oben).state);
          it.printf(2, 130, id(font2), "Pdc Unten:");
          it.printf(215, 160, id(font3), TextAlign::TOP_RIGHT, "%.0f W", id(pv_fas_Pdc_unten).state);
          it.printf(2, 220, id(font2), "Tagesertrag:");
          it.printf(235, 255, id(font5), TextAlign::TOP_RIGHT, "%.0f Wh", id(pv_fas_tagesertrag).state);          
      - id: page8
        lambda: |-
          it.printf(2, 0, id(font2), "Heizkreis:");
          it.printf(70, 30, id(font3), TextAlign::TOP_RIGHT, "%.0f", id(heiz_vl).state);
          it.printf(75, 30, id(font3), "/");
          it.printf(230, 30, id(font3), TextAlign::TOP_RIGHT, "%.0f°C", id(heiz_rl).state);
          it.printf(2, 90, id(font2), "Solarthermie:");
          it.printf(70, 125, id(font3), TextAlign::TOP_RIGHT, "%.0f", id(solar_vl).state);
          it.printf(75, 125, id(font3), "/");
          it.printf(230, 125, id(font3), TextAlign::TOP_RIGHT, "%.0f°C", id(solar_rl).state);
          it.printf(2, 185, id(font2), "Wärmepumpe:");
          it.printf(2, 220, id(font5), "P:");
          it.printf(212, 220, id(font5), TextAlign::TOP_RIGHT, "%.1fkW", id(power_wp).state);
          it.printf(2, 270, id(font5), "Ed:");
          it.printf(240, 270, id(font5), TextAlign::TOP_RIGHT, "%.0fkWh", id(energy_wp_day).state);
      - id: page9
        lambda: |-
          it.strftime(120, 45, id(font7), TextAlign::CENTER, "%H:%M", id(homeassistant_time).now());     
spi:
 clk_pin: 18 
 mosi_pin: 23
 miso_pin: 19

touchscreen:
  platform: xpt2046
  id: my_touchscreen
  cs_pin: 14
  interrupt_pin: 27
  calibration:
    x_min: 280
    x_max: 3860
    y_min: 340
    y_max: 3860


output:
  - platform: ledc
    pin: 15
    id: gpio_15_backlight_pwm
    inverted: true
    
light:
  - platform: monochromatic
    output: gpio_15_backlight_pwm
    name: "Touchdisplay Licht"
    id: back_light
    restore_mode: ALWAYS_ON