esphome:
  name: displaytft
  friendly_name: DisplayTFT

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: arduino

# Enable logging
logger:
  

# Enable Home Assistant API
api:
  encryption:
    key: "4Psr1Xhw+JtHxiETM/08BasfkQFC3zwlBDI3rXXyZ/w="

ota:
  - platform: esphome
    password: "a25db714a1af5052cd451cec259745f4"

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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Displaytft Fallback Hotspot"
    password: "mnSiduqBBZqx"

captive_portal:
    

# Enable MQTT
mqtt:
    discovery: true
    broker: 192.168.178.10
    port: 1883
    username: !secret mqtt_username
    password: !secret mqtt_password
    client_id: DisplayTFT
    topic_prefix: esphome
   

# Subscribe data
text_sensor:
  - platform: mqtt_subscribe
    id: Solar_Einspeisung_Jetzt
    topic: esphome/DisplayTFT/Solar/Einspeisung_Jetzt
  - platform: mqtt_subscribe
    id: Netz_Verbrauch_Jetzt
    topic: esphome/DisplayTFT/Netz/Verbrauch_Jetzt
  