-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathesp8266_white_board_esphome.yaml
93 lines (83 loc) · 2.47 KB
/
esp8266_white_board_esphome.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
# After ESPHome gnerates your core configuration, append the following six
# commented lines to your local .yaml file, uncomment the lines, save your local file, and install.
# Your local yaml file will pick up the White Board definitions from this github repository.
# packages:
# remote_esp8266_wb:
# url: https://github.com/heyitsyang/ESP8266-White-Board-ESPHome
# ref: main
# files:
# - esp8266_white_board_esphome.yaml
# If you wish to just include all of the white board definitions in your
# code rather than loading it from here, simply copy the lines below and
# append it to the end of your core configuration code.
# Don't forget you need to hold down S2 while powering up to enable the board for downloading.
#### vvvvvvvv WHITE BOARD PACKAGE DEFINITIONS BEGIN BELOW vvvvvvvvvvv ####
# output components (pins) need to be defined before
# they can be used by entities
output:
- platform: esp8266_pwm
id: output_component_red
pin: GPIO15
- platform: esp8266_pwm
id: output_component_grn
pin: GPIO13
- platform: esp8266_pwm
id: output_component_blu
pin: GPIO12
- platform: esp8266_pwm
id: output_component_wht
pin: GPIO14
- platform: gpio
pin: GPIO5
id: output_component_beeper
- platform: gpio
pin: GPIO16
id: output_component_relay
# create switch entities for the relay and beeper
switch:
- platform: output
name: "beeper"
output: output_component_beeper
- platform: output
name: "relay"
output: output_component_relay
# create a RGB light entity binding the three RGB outputs
light:
- platform: rgb
name: "RGB LED"
red: output_component_red
green: output_component_grn
blue: output_component_blu
# create an entity for the white light
- platform: monochromatic
name: "White LED"
output: output_component_wht
# create binary_sensor entities for S2 & S3
# the invert filters are because buttons are active low
binary_sensor:
- platform: gpio
pin: GPIO0
name: "S2"
filters:
- invert
- platform: gpio
pin: GPIO2
name: "S3"
filters:
- invert
# create sensor entities for DHT and AtoD
# AtoD uses the built-in function in the ESP8266
sensor:
- platform: dht
pin: GPIO4
temperature:
name: "DHT11 Temperature"
unit_of_measurement: "°C"
humidity:
name: "DHT11 Humidity"
unit_of_measurement: "%"
update_interval: 60s
- platform: adc
pin: A0
name: "AtoD Converter"
update_interval: 60s