You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
sensor:
|
|
|
|
# Battery level
|
|
|
|
- platform: adc
|
|
|
|
pin: _VBAT
|
|
|
|
name: "${node_name} VBAT Voltage"
|
|
|
|
id: voltage
|
|
|
|
attenuation: 11db
|
|
|
|
# filters:
|
|
|
|
# - multiply: 2
|
|
|
|
# filters:
|
|
|
|
# - lambda: return ( x/4096.0 ) * 2 * 3.42;
|
|
|
|
update_interval: 60s
|
|
|
|
- platform: template
|
|
|
|
name: "${node_name} Battery Level"
|
|
|
|
id: "battery_level"
|
|
|
|
unit_of_measurement: '%'
|
|
|
|
icon: "mdi:battery"
|
|
|
|
device_class: "battery"
|
|
|
|
state_class: "measurement"
|
|
|
|
accuracy_decimals: 1
|
|
|
|
update_interval: 60s
|
|
|
|
lambda: |-
|
|
|
|
return ((id(voltage).state -3) /1.2 * 100.00);
|
|
|
|
|
|
|
|
#deep_sleep:
|
|
|
|
# run_duration: 30s
|
|
|
|
# sleep_duration: 10min
|