Adding battery voltage measurement
This commit is contained in:
@@ -20,9 +20,9 @@ ota:
|
|||||||
<<: !include standard_mqtt_deepsleep.yaml
|
<<: !include standard_mqtt_deepsleep.yaml
|
||||||
deep_sleep:
|
deep_sleep:
|
||||||
run_duration: 20s
|
run_duration: 20s
|
||||||
sleep_duration: 40s #24h
|
sleep_duration: 240s #24h
|
||||||
esp32_ext1_wakeup:
|
esp32_ext1_wakeup:
|
||||||
pins:
|
pins:
|
||||||
- 33 #middle button
|
- 33 #middle button
|
||||||
- 34 #T button
|
- 34 #T button
|
||||||
- 35 #L button
|
- 35 #L button
|
||||||
@@ -40,28 +40,35 @@ sensor:
|
|||||||
accuracy_decimals: 0
|
accuracy_decimals: 0
|
||||||
lambda: |-
|
lambda: |-
|
||||||
return id(wake_up_reason);
|
return id(wake_up_reason);
|
||||||
|
- platform: adc
|
||||||
|
pin: GPIO39
|
||||||
|
attenuation: 11db
|
||||||
|
name: "Battery Voltage"
|
||||||
|
update_interval: 10s
|
||||||
|
filters:
|
||||||
|
- multiply: 0.83 #(3.24/3.90)
|
||||||
|
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
pin:
|
pin:
|
||||||
number: GPIO33
|
number: GPIO33
|
||||||
mode: INPUT_PULLUP
|
mode: INPUT_PULLUP
|
||||||
filters:
|
filters:
|
||||||
- delayed_on: 100ms ### <---- debounce time, was 100ms
|
- delayed_on: 100ms ### <---- debounce time, was 100ms
|
||||||
# - delayed_off: 10s ### <---- delay to capture state change on wake up
|
# - delayed_off: 10s ### <---- delay to capture state change on wake up
|
||||||
name: "TKM Test 33 middle button"
|
name: "TKM Test 33 middle button"
|
||||||
id: tkm_test_33
|
id: tkm_test_33
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
pin:
|
pin:
|
||||||
number: GPIO34
|
number: GPIO34
|
||||||
mode: INPUT_PULLUP
|
mode: INPUT_PULLUP
|
||||||
filters:
|
filters:
|
||||||
- delayed_on: 100ms ### <---- debounce time, was 100ms
|
- delayed_on: 100ms ### <---- debounce time, was 100ms
|
||||||
# - delayed_off: 10s ### <---- delay to capture state change on wake up
|
# - delayed_off: 10s ### <---- delay to capture state change on wake up
|
||||||
name: "TKM Test 34 T button"
|
name: "TKM Test 34 T button"
|
||||||
id: tkm_test_34
|
id: tkm_test_34
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
pin:
|
pin:
|
||||||
number: GPIO35
|
number: GPIO35
|
||||||
mode: INPUT_PULLUP
|
mode: INPUT_PULLUP
|
||||||
filters:
|
filters:
|
||||||
|
|||||||
Reference in New Issue
Block a user