Advertisement
Guest User

Untitled

a guest
Mar 1st, 2025
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. esphome:
  2. name: esphome-web-813d00
  3. friendly_name: ESPHomeDisplay
  4. min_version: 2024.11.0
  5. name_add_mac_suffix: false
  6.  
  7. on_boot:
  8. priority: 800
  9. then:
  10. - lambda: |-
  11. id(disp).enable();
  12. id(disp).transfer_byte(0x11);
  13. id(disp).disable();
  14. esp32:
  15. board: esp32-s3-devkitc-1
  16. framework:
  17. type: esp-idf
  18.  
  19. psram:
  20. mode: octal
  21. speed: 80MHz
  22.  
  23. # Enable logging
  24. logger:
  25.  
  26. font:
  27. - file: "gfonts://Roboto"
  28. id: roboto_font
  29. size: 20
  30.  
  31. # Enable Home Assistant API
  32. api:
  33.  
  34. # Allow Over-The-Air updates
  35. ota:
  36. - platform: esphome
  37.  
  38. wifi:
  39. ssid: !secret wifi_ssid
  40. password: !secret wifi_password
  41.  
  42. # Example configuration entry with 2 sensors and filter
  43.  
  44. sensor:
  45. - platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB
  46. name: "WiFi Signal dB"
  47. id: wifi_signal_db
  48. update_interval: 60s
  49. entity_category: "diagnostic"
  50.  
  51. - platform: copy # Reports the WiFi signal strength in %
  52. source_id: wifi_signal_db
  53. name: "WiFi Signal Percent"
  54. filters:
  55. - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
  56. unit_of_measurement: "Signal %"
  57. entity_category: "diagnostic"
  58. device_class: ""
  59.  
  60. spi:
  61. clk_pin: GPIO12 # Likely SCK (SPI Clock)
  62. mosi_pin: GPIO13 # Likely MOSI (SPI Data)
  63.  
  64. display:
  65. - platform: ili9xxx
  66. model: st7789v
  67. dimensions:
  68. height: 170
  69. width: 320
  70. offset_height: 35
  71. offset_width: 0
  72.  
  73. color_order: bgr
  74. invert_colors: true
  75. data_rate: 80MHz
  76. spi_mode: 0
  77. cs_pin: GPIO10 # Could be Chip Select (not confirmed)
  78. dc_pin: GPIO11 # Likely Data/Command (D/C)
  79. reset_pin: GPIO1 # Likely Reset (RST)
  80. update_interval: 1s
  81. id: disp
  82. rotation: 270
  83. show_test_card: true
  84. lambda: |-
  85. it.fill(Color::BLACK);
  86. delay(100);
  87. it.print(10, 10, id(roboto_font), Color::WHITE, TextAlign::TOP_LEFT, "Hello, World!");
  88.  
  89. output:
  90. - platform: gpio
  91. pin:
  92. number: GPIO14
  93. allow_other_uses: true # Adjust based on your board
  94. id: backlight_control
  95.  
  96. light:
  97. - platform: binary
  98. output: backlight_control
  99. name: "Display Backlight"
  100. restore_mode: ALWAYS_ON
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement