-
Notifications
You must be signed in to change notification settings - Fork 16
/
xmas_1.yaml
57 lines (49 loc) · 1.05 KB
/
xmas_1.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
---
substitutions:
device: xmas-1
name: Kerstboom
reboot_timeout: 14d
update_interval: 10min
esphome:
name: ${device}
platform: ESP8266
board: esp01_1m
includes:
- ${device}.h
<<: !include common/common.yaml
<<: !include common/sensors.yaml
logger:
level: INFO
hardware_uart: UART1 # UART0 - slave controller for relay
status_led:
pin:
number: GPIO13
inverted: true
uart:
id: sil_f330
tx_pin: GPIO01
rx_pin: GPIO03
baud_rate: 19200
switch:
- !include common/switch/restart.yaml
- platform: template
name: ${name}
id: kerstboom
icon: mdi:pine-tree
turn_on_action:
uart.write: [0xA0, 0x04, 0x01, 0xA1]
turn_off_action:
uart.write: [0xA0, 0x04, 0x00, 0xA1]
optimistic: true
binary_sensor:
- !include common/binary_sensor/status.yaml
- platform: custom
lambda: |-
auto button = new SilF330Button(id(sil_f330));
App.register_component(button);
return {button};
binary_sensors:
id: button
on_press:
then:
- switch.toggle: kerstboom