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 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
| esphome: name: esp32
esp32: board: esp32dev framework: type: esp-idf version: latest sdkconfig_options: CONFIG_COMPILER_OPTIMIZATION_SIZE: y advanced: ignore_efuse_mac_crc: false
logger:
api:
ota: password: ""
wifi: ssid: !secret wifi_ssid password: !secret wifi_password
ap: ssid: "Esp32 Fallback Hotspot" password: "PMQ3aD1W8AVF"
binary_sensor: - platform: gpio id: wledon pin: number: GPIO25 mode: INPUT on_click: min_length: 50ms max_length: 300ms then: - homeassistant.service: service: light.turn_on data: entity_id: light.wled - platform: gpio id: wledoff pin: number: GPIO34 mode: INPUT on_click: min_length: 50ms max_length: 300ms then: - homeassistant.service: service: light.turn_off data: entity_id: light.wled - platform: gpio id: acoff pin: number: GPIO32 mode: INPUT on_click: min_length: 50ms max_length: 300ms then: - homeassistant.service: service: switch.turn_off data: entity_id: switch.bedroom_ac_switch - platform: gpio id: acon pin: number: GPIO35 mode: INPUT on_click: min_length: 50ms max_length: 300ms then: - homeassistant.service: service: switch.turn_on data: entity_id: switch.bedroom_ac_switch remote_receiver: pin: number: GPIO14 inverted: True mode: INPUT_PULLUP dump: raw idle: 40ms
remote_transmitter: pin: number: GPIO27 carrier_duty_percent: 50%
switch: - platform: template name: "BedRoom AC Switch" id: esp32_ac_swi turn_on_action: then: - switch.template.publish: id: esp32_ac_swi state: ON - if: condition: lambda: 'return id(temperature).state < 20;' then: - script.execute: turn_ac_20c else: - script.execute: turn_ac_27c
turn_off_action: then: - switch.template.publish: id: esp32_ac_swi state: OFF - script.execute: turn_ac_off
esp32_ble_tracker: scan_parameters: interval: 1s window: 500ms active: false sensor: - platform: ble_rssi mac_address: FA:4C:19:74:CF:31 name: "MI Band RSSI value" - platform: homeassistant entity_id: weather.wo_de_jia id: temperature attribute: temperature script: - id: turn_ac_20c then: - remote_transmitter.transmit_raw: carrier_frequency: 38kHz code: [9016, -4481, 620, -570, 620, -570, 619, -1670, 620, -1671, 620, -570, 621, -569, 621, -1668, 619, -572, 620, -569, 620, -570, 621, -1669, 621, -570, 621, -568, 620, -570, 621, -569, 621, -569, 622, -568, 619, -572, 619, -570, 621, -569, 619, -572, 619, -1671, 618, -571, 620, -1670, 620, -571, 619, -571, 618, -571, 619, -570, 621, -1670, 620, -570, 646, -1643, 621, -569, 621, -569, 621, -1669, 620, -571, 619, -19990, 620, -1670, 620, -571, 620, -568, 622, -569, 621, -1669, 621, -569, 617, -573, 617, -573, 620, -570, 645, -545, 621, -569, 620, -570, 619, -570, 621, -1669, 618, -572, 645, -546, 619, -571, 645, -544, 620, -571, 617, -573, 643, -547, 620, -569, 620, -571, 617, -572, 644, -546, 618, -572, 612, -578, 621, -569, 619, -1671, 617, -573, 620, -1670, 644, -1646, 619, -7223, 9010, -4489, 617, -573, 615, -575, 643, -1647, 620, -1670, 643, -546, 619, -572, 616, -1674, 617, -573, 644, -545, 618, -573, 617, -1673, 615, -574, 642, -549, 617, -572, 618, -572, 617, -573, 643, -547, 644, -546, 614, -576, 643, -547, 593, -598, 643, -1646, 643, -547, 616, -1674, 639, -551, 610, -580, 616, -574, 641, -549, 617, -1673, 592, -1699, 617, -1672, 639, -551, 642, -547, 593, -1698, 592, -598, 640, -19969, 637, -553, 593, -597, 642, -548, 642, -548, 640, -550, 592, -598, 592, -598, 593, -597, 592, -597, 642, -549, 593, -597, 594, -596, 593, -597, 592, -598, 640, -550, 593, -597, 593, -597, 593, -597, 592, -597, 593, -598, 641, -548, 640, -551, 592, -597, 642, -549, 593, -597, 593, -596, 594, -597, 593, -596, 594, -596, 593, -1697, 594, -596, 594, -1696, 594] - id: turn_ac_off then: - remote_transmitter.transmit_raw: carrier_frequency: 38kHz code: [9021, -4476, 625, -1666, 624, -565, 624, -567, 625, -567, 621, -567, 626, -566, 622, -1666, 624, -566, 623, -1666, 626, -1691, 597, -566, 626, -1664, 625, -593, 597, -566, 624, -566, 625, -565, 624, -565, 622, -569, 624, -565, 625, -565, 625, -592, 599, -564, 624, -566, 626, -564, 626, -565, 625, -566, 623, -565, 624, -566, 624, -1666, 625, -565, 625, -1665, 626, -564, 623, -567, 624, -1666, 623, -567, 626, -19983, 625, -1665, 624, -567, 625, -564, 624, -566, 626, -1664, 623, -593, 599, -565, 624, -566, 624, -566, 624, -594, 598, -566, 622, -567, 624, -591, 598, -1666, 625, -565, 623, -567, 624, -569, 622, -564, 625, -568, 621, -569, 624, -564, 623, -567, 625, -564, 624, -566, 623, -568, 624, -566, 623, -566, 626, -566, 622, -1666, 623, -568, 623, -567, 624, -1665, 624, -7194, 9041, -4481, 626, -1665, 624, -568, 621, -566, 622, -569, 625, -567, 622, -568, 621, -1668, 622, -566, 624, -1666, 625, -1666, 623, -567, 625, -1664, 623, -594, 598, -591, 599, -566, 621, -595, 599, -565, 625, -564, 624, -566, 625, -567, 622, -569, 622, -565, 623, -569, 623, -568, 622, -567, 622, -568, 621, -567, 624, -566, 623, -1669, 623, -1692, 597, -1666, 624, -565, 625, -566, 624, -1668, 622, -565, 623, -19985, 627, -565, 626, -564, 626, -565, 623, -566, 625, -566, 623, -593, 595, -594, 600, -565, 622, -593, 597, -567, 624, -566, 623, -567, 624, -566, 625, -565, 625, -565, 626, -564, 623, -567, 623, -567, 623, -569, 622, -566, 622, -568, 622, -569, 623, -566, 623, -567, 623, -566, 624, -567, 623, -566, 624, -568, 623, -566, 622, -1667, 625, -1665, 623, -594, 596] - id: turn_ac_27c then: - remote_transmitter.transmit_raw: carrier_frequency: 38kHz code: [9048, -4448, 653, -1665, 623, -539, 653, -537, 650, -1668, 625, -537, 654, -537, 650, -1640, 650, -539, 652, -1639, 651, -1638, 651, -539, 652, -1638, 653, -538, 651, -539, 650, -540, 652, -538, 650, -539, 652, -539, 651, -537, 652, -538, 652, -538, 652, -1638, 651, -540, 652, -537, 653, -538, 650, -567, 623, -539, 651, -539, 651, -1639, 652, -566, 623, -1639, 652, -538, 653, -537, 652, -1638, 652, -539, 651, -19956, 653, -1638, 653, -539, 652, -536, 650, -541, 650, -1666, 627, -536, 654, -536, 650, -541, 653, -537, 650, -539, 653, -565, 625, -537, 652, -538, 652, -1638, 652, -540, 650, -541, 649, -565, 625, -566, 624, -538, 651, -539, 651, -539, 653, -537, 652, -565, 624, -539, 652, -538, 652, -539, 649, -539, 653, -564, 625, -1639, 652, -539, 650, -539, 652, -565, 625, -7187, 9047, -4453, 653, -1640, 649, -566, 625, -540, 651, -1637, 652, -538, 651, -539, 651, -1638, 653, -538, 650, -1640, 651, -1640, 652, -537, 652, -1637, 653, -537, 652, -541, 649, -538, 653, -538, 652, -540, 649, -565, 626, -539, 651, -539, 653, -537, 652, -1637, 652, -538, 653, -537, 652, -565, 625, -564, 627, -537, 653, -537, 652, -1664, 627, -1636, 653, -1637, 654, -563, 626, -538, 653, -1637, 653, -537, 651, -19956, 653, -539, 654, -537, 650, -566, 625, -538, 652, -538, 652, -538, 654, -536, 651, -539, 652, -538, 653, -564, 624, -539, 651, -539, 651, -539, 651, -538, 651, -540, 651, -538, 653, -538, 652, -537, 652, -538, 652, -565, 624, -567, 625, -538, 653, -562, 626, -538, 652, -538, 651, -540, 651, -538, 654, -536, 653, -537, 651, -1665, 627, -1637, 652, -1638, 652]
|