esphome:
  name: s3
  friendly_name: ESP32-S3 T-Display

esp32:
  variant: esp32s3
  framework:
    type: esp-idf
  flash_size: 16MB

logger:

api:

ota:
  platform: esphome
  password: !secret ota_password

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  id: wifi_client
  manual_ip:
    static_ip: 192.168.4.11
    gateway: 192.168.4.1
    subnet: 192.168.4.255
  use_address: ff2.iot.snel.it

binary_sensor:
  - platform: gpio
    pin:
      ignore_strapping_warning: true
      number: GPIO0
      inverted: true
    name: "Button 1"
  - platform: gpio
    pin:
      number: GPIO14
      inverted: true
    name: "Button 2"

output:
  - platform: ledc
    frequency: 2000
    pin: GPIO38
    id: backlight_output
  - platform: x9c
    id: x9c_pot
    cs_pin: GPIO43
    inc_pin: GPIO44
    ud_pin: GPIO18
    initial_value: 0.01
   # step_delay: 100us

number:
  - platform: template
    name: servo_control
    min_value: 0.01
    max_value: 1
    step: 0.01
    optimistic: true
    set_action:
      then:
        - output.set_level:
            id: x9c_pot
            level: !lambda 'return x;'

mqtt:
    broker: 192.168.4.1

light:
  - platform: monochromatic
    output: backlight_output
    name: LCD Backlight
    id: led
    restore_mode: ALWAYS_ON
    default_transition_length: 0s

spi:
  type: octal
  clk_pin: 8
  data_pins:
    - 39
    - 40
    - 41
    - 42
    - ignore_strapping_warning: true
      number: 45
    - ignore_strapping_warning: true
      number: 46
    - 47
    - 48

psram:
  speed: 80MHz
  mode: octal

display:
  - platform: mipi_spi
    model: t-display-s3
    rotation: 270
    show_test_card: true # display basic hello-world
