Created
April 2, 2022 13:43
-
-
Save mikezter/2da42c934998ac08d3b423aed107a8c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esphome: | |
name: minidisplay | |
platform: ESP32 | |
board: nodemcu-32s | |
wifi: | |
id: WiFi1 | |
ssid: !secret wifi_ssid | |
password: !secret wifi_password | |
use_address: 192.168.0.166 | |
# Enable logging | |
logger: | |
# Enable OTA updates | |
ota: | |
# Enable Home Assistant API | |
api: | |
spi: | |
clk_pin: GPIO18 | |
mosi_pin: GPIO19 | |
time: | |
- platform: homeassistant | |
id: esptime | |
#fonts (folder 'fonts') | |
font: | |
- file: fonts/slkscr.ttf | |
id: font1 | |
size: 24 | |
#Icons (folder 'images') | |
image: | |
- file: "images/LAMP_ON.png" | |
id: lamp_on | |
type: RGB24 | |
- file: "images/LAMP_OFF.png" | |
id: lamp_off | |
type: RGB24 | |
- file: "images/wifi_24x24.png" | |
id: wifi_img | |
type: RGB24 | |
- file: "images/ha_24x24.png" | |
id: ha_img | |
type: RGB24 | |
display: | |
#based on https://github.com/musk95/esphome | |
- platform: st7789v | |
id: st7789vdisplay | |
reset_pin: GPIO23 | |
dc_pin: GPIO16 | |
cs_pin: GPIO5 | |
backlight_pin: GPIO4 | |
brightness: 25% | |
update_interval: 5s | |
rotation: 90 | |
lambda: |- | |
auto red = Color(255, 0, 0); | |
auto green = Color(0, 255, 0); | |
auto blue = Color(0, 0, 255); | |
auto white = Color(255, 255, 255); | |
it.line(0, 0, 240, 135, red); | |
it.line(240, 0, 0, 135, green); | |
it.strftime(120, 67, id(font1), TextAlign::CENTER, "%H:%M", id(esptime).now()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment