forked from AdamKGoddard/XiaomiIR_ESPHome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xiaomi_ir.yaml
110 lines (88 loc) · 2.24 KB
/
xiaomi_ir.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
substitutions:
devicename: xiaomi_ir
upper_devicename: Xiaomi IR Remote
esphome:
name: $devicename
platform: ESP32
board: esp32doit-devkit-v1
platformio_options:
platform: [email protected]
platform_packages: |-4
framework-arduinoespressif32 @ https://github.com/pauln/arduino-esp32.git#solo-no-mac-crc/1.0.4
wifi:
ssid: "your_SSID_here"
password: "your_Password_here"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Xiaomi Ir Fallback Hotspot"
password: "your_Password_here"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
password: "api_password_here"
ota:
password: "ota_password_here"
web_server:
port: 80
binary_sensor:
- platform: gpio
pin:
number: GPIO32
inverted: False
name: ${upper_devicename} Button A
- platform: gpio
pin:
number: GPIO33
inverted: False
name: ${upper_devicename} Button B
- platform: gpio
pin:
number: GPIO34
inverted: False
name: ${upper_devicename} Button C
- platform: gpio
pin:
number: GPIO35
inverted: False
name: ${upper_devicename} Button D
status_led:
pin:
number: GPIO18 #Orange LED - flashes for status events
inverted: True
output:
- platform: gpio
pin: GPIO23 #Blue LED - Powered on always
id: PowerLED
sensor:
- platform: wifi_signal
name: ${upper_devicename} WiFi Signal
- platform: uptime
name: ${upper_devicename} Uptime
switch:
- platform: restart
name: ${upper_devicename} Restart
- platform: template
name: ${upper_devicename} LG TV Power On
turn_on_action:
- remote_transmitter.transmit_lg:
data: 0x02FD48B7
nbits: 32
transmitter_id: internal
mqtt:
broker: "your_broker_ip_address"
username: "your_mqtt_username"
password: "your_mqtt_password"
discovery: True
remote_receiver:
pin:
number: GPIO27
inverted: True
dump: all
remote_transmitter:
pin:
number: GPIO26
inverted: False #Needs idle state to be set to high. Not currently feasible. Will cause board heating.
carrier_duty_percent: 50%
id: internal