forked from smlight-tech/slwf-08
-
Notifications
You must be signed in to change notification settings - Fork 0
/
slwf-08-johnboiles.yaml
89 lines (76 loc) · 1.92 KB
/
slwf-08-johnboiles.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
substitutions:
name: hdmi-control
friendly_name: "HDMI Control"
esphome:
name: "${name}"
friendly_name: "${friendly_name}"
# platformio_options:
# board_buid.f_cpu: 160000000L
name_add_mac_suffix: true
project:
name: SMLIGHT.SLWF-08-HDMI
version: "1.0"
platform: ESP8266
board: esp12e
wifi:
ssid: "SSID-name"
password: "password"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "HDMI-AP"
password: "slwf08"
captive_portal:
# Enable Home Assistant API
api:
ota:
- platform: esphome
#web_server:
# port: 80
# Enable logging
logger:
external_components:
- source: github://johnboiles/esphome-hdmi-cec
# - source: github://Palakis/esphome-hdmi-cec
dashboard_import:
package_import_url: github://smlight-tech/slwf-08/esphome-configs/slwf-08-johnboiles.yaml
hdmi_cec:
pin: GPIO14
address: 0x05
physical_address: 0x4000
button:
- platform: template
name: "Turn everything on"
on_press:
- hdmi_cec.send:
destination: 0xF # or 0xF for Broadcast
data: [0x04] # "Image View on
- platform: template
name: "Turn everything off"
on_press:
- hdmi_cec.send:
destination: 0xF
data: [0x36] # "Standby" opcode
- platform: template
name: "Turn active source"
on_press:
- hdmi_cec.send:
destination: 0xF # Broadcast
data: [0x82] # "Power on" opcode
- platform: template
name: "Mute"
on_press:
- hdmi_cec.send:
destination: 0xF # Broadcast
data: [0x43] # "Mute" opcode
- platform: template
name: "Volume Down"
on_press:
- hdmi_cec.send:
destination: 0xF # Broadcast
data: [0x42] # "Volume Down" opcode
- platform: template
name: "Volume up"
on_press:
- hdmi_cec.send:
destination: 0xF # Broadcast
data: [0x41] # "Volume up" opcode