Adding battery voltage measurement
This commit is contained in:
@@ -20,7 +20,7 @@ ota:
|
||||
<<: !include standard_mqtt_deepsleep.yaml
|
||||
deep_sleep:
|
||||
run_duration: 20s
|
||||
sleep_duration: 40s #24h
|
||||
sleep_duration: 240s #24h
|
||||
esp32_ext1_wakeup:
|
||||
pins:
|
||||
- 33 #middle button
|
||||
@@ -40,6 +40,13 @@ sensor:
|
||||
accuracy_decimals: 0
|
||||
lambda: |-
|
||||
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:
|
||||
- platform: gpio
|
||||
|
||||
Reference in New Issue
Block a user