-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbasic-example.yaml
122 lines (109 loc) · 2.67 KB
/
basic-example.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
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
# Basic configuration example
# Available icons can be found in 'components\nspanel_lovelace\icons.json'. Icon colors range from 0 to 65535.
# NOTE: This project is in the beta stage so the configuration is subject to change without notice.
# Please check your own configuration againist the latest example when updating.
esphome:
name: nspanel
name_add_mac_suffix: true
comment: "ESPHome Basic NSPanel Example"
build_path: ./.build/nspanel-basic
esp32:
board: esp32dev
framework:
# ESP-IDF is requried so we can access the NSPanel PSRAM
# which is on non-standard pins. ESP-IDF also uses less flash than Arduino!
type: esp-idf
external_components:
- source:
type: git
url: https://github.com/olicooper/esphome-nspanel-lovelace-native
ref: dev
refresh: 3h
components: [nspanel_lovelace]
nspanel_lovelace:
id: nspanel
screensaver:
time_id: homeassistant_time
cards:
- type: cardGrid
id: front_room
title: Front Room
entities:
- entity_id: light.front_room_all
name: All
- entity_id: light.front_room_inner
name: Inner
- entity_id: light.front_room_outer
name: Outer
- entity_id: scene.front_room_all_default
name: Default
logger:
baud_rate: 115200
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
api:
services:
## Service to update the TFT firmware using a URL that is accessible to the nspanel
- service: upload_tft
variables:
url: string
then:
- lambda: 'id(nspanel).upload_tft(url);'
ota:
platform: esphome
## UART for the Nextion display
uart:
id: uart_nextion
tx_pin: 16
rx_pin: 17
baud_rate: 115200
time:
- platform: homeassistant
id: homeassistant_time
timezone: Europe/London
switch:
## Physical relay 1
- platform: gpio
name: Relay 1
id: relay_1
pin:
number: 19
restore_mode: ALWAYS_ON
## Physical relay 2
- platform: gpio
name: Relay 2
id: relay_2
pin:
number: 22
restore_mode: ALWAYS_ON
## Turn screen power on/off
- platform: gpio
name: Screen Power
id: screen_power
entity_category: config
pin:
number: 4
inverted: true
restore_mode: ALWAYS_ON
binary_sensor:
## Left button below the display
- platform: gpio
name: Left Button
pin:
number: GPIO14
inverted: true
id: left_button
internal: true
on_click:
- switch.toggle: relay_1
## Right button below the display
- platform: gpio
name: Right Button
pin:
number: GPIO27
inverted: true
id: right_button
internal: true
on_click:
- switch.toggle: relay_2