Adding battery voltage measurement
This commit is contained in:
@@ -20,7 +20,7 @@ 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
|
||||||
@@ -40,6 +40,13 @@ 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
|
||||||
|
|||||||
Reference in New Issue
Block a user