-
Notifications
You must be signed in to change notification settings - Fork 32
/
basic-config.yml
132 lines (112 loc) · 2.25 KB
/
basic-config.yml
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
substitutions:
name: nspanel
device_name: NSPanel
external_components:
- source:
type: git
url: https://github.com/sairon/esphome-nspanel-lovelace-ui
# Using dev is discouraged, see https://github.com/sairon/esphome-nspanel-lovelace-ui/blob/dev/README.md#usage
ref: dev
components: [nspanel_lovelace]
esphome:
name: ${name}
esp32:
board: esp32dev
framework:
type: arduino
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
nspanel_lovelace:
id: nspanel
ota:
logger:
binary_sensor:
- platform: gpio
name: $device_name Left Button
internal: true
pin:
number: 14
inverted: true
on_click:
- switch.toggle: relay_1
- platform: gpio
name: $device_name Right Button
internal: true
pin:
number: 27
inverted: true
on_click:
- switch.toggle: relay_2
sensor:
- platform: wifi_signal
name: $device_name WiFi Signal
update_interval: 60s
internal: true
- platform: ntc
id: temperature
sensor: resistance_sensor
calibration:
b_constant: 3950
reference_temperature: 25°C
reference_resistance: 10kOhm
name: $device_name Temperature
- platform: resistance
id: resistance_sensor
sensor: ntc_source
configuration: DOWNSTREAM
resistor: 11.2kOhm
internal: true
- platform: adc
id: ntc_source
pin: 38
update_interval: 10s
attenuation: 11db
internal: true
switch:
- platform: gpio
name: $device_name Relay 1
id: relay_1
pin:
number: 22
- platform: gpio
name: $device_name Relay 2
id: relay_2
pin:
number: 19
- platform: gpio
id: screen_power
entity_category: config
pin:
number: 4
inverted: true
restore_mode: ALWAYS_ON
output:
- platform: ledc
id: buzzer_out
pin:
number: 21
rtttl:
id: buzzer
output: buzzer_out
mqtt:
broker: 192.168.1.1
uart:
- id: tf_uart
tx_pin: 16
rx_pin: 17
baud_rate: 115200
api:
services:
- service: upload_tft
variables:
url: string
then:
- lambda: |-
id(nspanel).upload_tft(url);
- service: play_rtttl
variables:
song_str: string
then:
- rtttl.play:
rtttl: !lambda 'return song_str;'