I’ve seen a lot of approaches to battery monitoring, and several pretty cool options that save you the trouble of creating templates for all your batteries. I’ve seen a few comments about polling, and battery life, etc. But does a value template that pulls its value from another sensor really have any effect on battery life? I would think not, but was curious.
Like this one for example (it’s a pretty commmon template around here)
door_lock_batteries_garage_door:
friendly_name: Garage Door Lock Battery Level
value_template: "{% if states.zwave.lock_garage_door_lock %}
{{ states.zwave.lock_garage_door_lock.attributes.battery_level }}
{% else %}
unknown
{% endif %}"
unit_of_measurement: '%'
# entity_id: zwave.lock_garage_door_lock
icon_template: >-
{% set battery_level = states('sensor.door_lock_batteries_garage_door')|int('unknown') %}
{% set battery_round = (battery_level|int / 10)|int * 10 %}
{% if battery_level == 'unknown' %}
mdi:battery-unknown
{% else %}
{% if battery_round >= 100 %}
mdi:battery
{% elif battery_round > 0 %}
mdi:battery-{{ battery_round }}
{% else %}
mdi:battery-alert
{% endif %}
{% endif %}
The Battery level is already there in the zwave entity, does having a template cause more polling?
Thanks,