Working on buttonbox.

This commit is contained in:
2021-01-31 19:09:00 -05:00
parent 7dd07e3c54
commit e18bfca8ed

View File

@@ -3,15 +3,10 @@ esphome:
platform: ESP32 platform: ESP32
board: esp32cam board: esp32cam
on_boot: on_boot:
- priority: -100 #900 tried down to 500
then:
- lambda: |-
id(wake_up_reason1) = esp_sleep_get_ext1_wakeup_status();
- priority: 900 #900 tried down to 500 - priority: 900 #900 tried down to 500
then: then:
- lambda: |- - lambda: |-
id(wake_up_reason) = esp_sleep_get_ext1_wakeup_status(); id(wake_up_reason) = log(esp_sleep_get_ext1_wakeup_status())/log(2);
wifi: wifi:
ssid: "Meneely" ssid: "Meneely"
@@ -61,7 +56,7 @@ mqtt:
deep_sleep: deep_sleep:
run_duration: 20s run_duration: 20s
sleep_duration: 40s #24h sleep_duration: 24h
esp32_ext1_wakeup: esp32_ext1_wakeup:
pins: pins:
- 13 #yellow - 13 #yellow
@@ -75,21 +70,13 @@ globals:
type: int type: int
restore_value: no restore_value: no
initial_value: '0' initial_value: '0'
- id: wake_up_reason1
type: int
restore_value: no
initial_value: '0'
sensor: sensor:
- platform: template - platform: template
name: "Remote Control Wake Reason" name: "Remote Control Wake Reason"
accuracy_decimals: 0 accuracy_decimals: 0
lambda: |- lambda: |-
return id(wake_up_reason); return id(wake_up_reason);
- platform: template
name: "Remote Control Wake Reason1"
accuracy_decimals: 0
lambda: |-
return id(wake_up_reason1);
# on_value: # on_value:
# then: # then:
# - if: # - if: