mirror of
https://github.com/esphome/esphome.git
synced 2026-10-11 05:44:15 +00:00
[gpio][esp32][uart] Add option to hold gpio during (deep)sleep and reboot (3/3) (#18964)
Co-authored-by: J. Nick Koston <nick@koston.org> Co-authored-by: J. Nick Koston <nick@home-assistant.io>
This commit is contained in:
co-authored by
J. Nick Koston
J. Nick Koston
parent
dc553aae55
commit
ba7d3bd770
@@ -1,5 +1,27 @@
|
||||
substitutions:
|
||||
wakeup_pin: GPIO4
|
||||
|
||||
<<: !include common.yaml
|
||||
<<: !include common-esp32-all.yaml
|
||||
packages:
|
||||
deep_sleep: !include common.yaml
|
||||
deep_sleep_esp32: !include common-esp32-all.yaml
|
||||
|
||||
power_supply:
|
||||
- id: power_supply_ds_esp32
|
||||
pin:
|
||||
number: GPIO5
|
||||
hold_state: true
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO22
|
||||
hold_state: true
|
||||
id: gpio_output_ds_esp32
|
||||
power_supply: power_supply_ds_esp32
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO23
|
||||
hold_state: true
|
||||
id: gpio_switch_ds_esp32
|
||||
|
||||
@@ -6,4 +6,19 @@ substitutions:
|
||||
switch_pin_3: GPIO6
|
||||
switch_pin_4: GPIO7
|
||||
|
||||
<<: !include common.yaml
|
||||
packages:
|
||||
gpio: !include common.yaml
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO8
|
||||
hold_state: true
|
||||
id: gpio_binary_sensor_esp32
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO9
|
||||
hold_state: true
|
||||
id: gpio_output_esp32
|
||||
|
||||
@@ -6,4 +6,26 @@ substitutions:
|
||||
switch_pin_3: GPIO16
|
||||
switch_pin_4: GPIO17
|
||||
|
||||
<<: !include common.yaml
|
||||
packages:
|
||||
gpio: !include common.yaml
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO18
|
||||
hold_state: true
|
||||
id: gpio_binary_sensor_esp32
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO19
|
||||
hold_state: true
|
||||
id: gpio_output_esp32
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO21
|
||||
hold_state: true
|
||||
id: gpio_switch_esp32
|
||||
|
||||
@@ -14,7 +14,12 @@ esphome:
|
||||
|
||||
uart:
|
||||
- id: uart_id
|
||||
tx_pin: 17
|
||||
tx_pin:
|
||||
number: 17
|
||||
mode:
|
||||
pullup: true
|
||||
output: true
|
||||
hold_state: true
|
||||
rx_pin: 16
|
||||
flow_control_pin: 4
|
||||
baud_rate: 9600
|
||||
|
||||
Reference in New Issue
Block a user