Working on buttonbox.
This commit is contained in:
@@ -3,15 +3,10 @@ esphome:
|
||||
platform: ESP32
|
||||
board: esp32cam
|
||||
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
|
||||
then:
|
||||
- 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:
|
||||
ssid: "Meneely"
|
||||
@@ -61,7 +56,7 @@ mqtt:
|
||||
|
||||
deep_sleep:
|
||||
run_duration: 20s
|
||||
sleep_duration: 40s #24h
|
||||
sleep_duration: 24h
|
||||
esp32_ext1_wakeup:
|
||||
pins:
|
||||
- 13 #yellow
|
||||
@@ -75,21 +70,13 @@ globals:
|
||||
type: int
|
||||
restore_value: no
|
||||
initial_value: '0'
|
||||
- id: wake_up_reason1
|
||||
type: int
|
||||
restore_value: no
|
||||
initial_value: '0'
|
||||
sensor:
|
||||
- platform: template
|
||||
name: "Remote Control Wake Reason"
|
||||
accuracy_decimals: 0
|
||||
lambda: |-
|
||||
return id(wake_up_reason);
|
||||
- platform: template
|
||||
name: "Remote Control Wake Reason1"
|
||||
accuracy_decimals: 0
|
||||
lambda: |-
|
||||
return id(wake_up_reason1);
|
||||
|
||||
# on_value:
|
||||
# then:
|
||||
# - if:
|
||||
|
||||
Reference in New Issue
Block a user