-
Notifications
You must be signed in to change notification settings - Fork 7
/
xiaomi_ir.yaml
108 lines (88 loc) · 2.05 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
esphome:
name: xiaomi-ir
friendly_name: Xiaomi-IR
platformio_options:
extra_scripts:
- pre:/config/esphome/pre_extra_script.py
esp32:
board: esp32doit-devkit-v1
framework:
type: esp-idf
sdkconfig_options:
CONFIG_FREERTOS_UNICORE: y
advanced:
ignore_efuse_mac_crc: true
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "your encryption key"
ota:
password: "your ota password"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Xiaomi-Ir Fallback Hotspot"
password: "your fallback password"
captive_portal:
web_server:
port: 80
binary_sensor:
- platform: gpio
pin:
number: GPIO32
inverted: False
name: ${friendly_name} Button A
- platform: gpio
pin:
number: GPIO33
inverted: False
name: ${friendly_name} Button B
- platform: gpio
pin:
number: GPIO34
inverted: False
name: ${friendly_name} Button C
- platform: gpio
pin:
number: GPIO35
inverted: False
name: ${friendly_name} 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
inverted: False #Change to True to disable the power LED
sensor:
- platform: wifi_signal
name: ${friendly_name} WiFi Signal
- platform: uptime
name: ${friendly_name} Uptime
switch:
- platform: restart
name: ${friendly_name} Restart
- platform: template
name: ${friendly_name} LG TV Power On
turn_on_action:
- remote_transmitter.transmit_lg:
data: 0x02FD48B7
nbits: 32
transmitter_id: xiaomi
remote_receiver:
pin:
number: GPIO27
inverted: True
dump: all
remote_transmitter:
pin:
number: GPIO26
inverted: True
carrier_duty_percent: 50%
id: xiaomi