-
Notifications
You must be signed in to change notification settings - Fork 214
/
Copy pathyellowtft1.yaml
96 lines (86 loc) · 2.15 KB
/
yellowtft1.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#
# Basic yaml code to get the ESP32-2432S028R display to work in ESPHome.
#
# This yaml publishes the RGB LED on the back of the display to Home Assistant.
#
# Written by Jonny Bergdahl
# - [GitHub](https://github.com/jonnybergdahl)
# - [Twitter](https://twitter.com/jonnybergdahl)
# - [YouTube](https://www.youtube.com/jonnybergdahl)
#
# ============================================================
# NOTE:
# In order for this to work you need to add the following settings in your secrets.yaml file:
# - api_key
# - ota_password
# - wifi_ssid
# - wifi_password
# - ap_password
#
# ============================================================
# Example file setup
# Change the naming below, they will be the names used in Home Assistant
#
substitutions:
device_name: yellowtft1
friendly_name: Yellow TFT 1
# ============================================================
# Standard ESPHome setup
#
# ESPHome naming
esphome:
name: $device_name
friendly_name: $friendly_name
# The ESP32-2432S028R uses a standard ESP32-WROVER, so we use the esp32dev defintion
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: !secret api_key
# Set OTA password
ota:
platform: esphome
password: !secret ota_password
# Setup WiFi credentials
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: $device_name Fallback Hotspot
password: !secret ap_password
captive_portal:
# ============================================================
# Home Assistant related setup
#
# Setup a RGB light in Home Assistant
light:
- platform: rgb
name: RGB
id: led
red: led_red
green: led_green
blue: led_blue
restore_mode: ALWAYS_OFF
# ============================================================
# Hardware related setup
#
# Setup the pins that control the RGB LED
output:
- platform: ledc
pin: GPIO4
id: led_red
inverted: true
- platform: ledc
pin: GPIO16
id: led_green
inverted: true
- platform: ledc
pin: GPIO17
id: led_blue
inverted: true