zWave - Aeotec Wallmont Template Sensor

Hello :slight_smile:

my Aeotec Wallmote works now :sunny: so now i will monitore the battery level…

i try it with this:

- platform: template
  sensors:

    zwave_Eingang:
      friendly_name: "ZWave - Batterie"
      icon_template: mdi:train
      value_template: '{{ states.zwave.aeotec_zw130_wallmote_quad.attributes.battery_level }}'

this will not work then i try it with

zwave_test:
  value_template: '{% if states.zwave.aeotec_zw130_wallmote_quadzwave %} {{ states.zwave.aeotec_zw130_wallmote_quadzwave.attributes.battery_level }} {% else %} Unknown {% endif %}'
  unit_of_measurement: '%'

—> = Unknown

but this don’t work… where i have the problem?

Your first template looks OK for getting the battery level, but you have an invalid entity ID name. Only lower case letters are allowed. I would use this:

- platform: template
  sensors:

    zwave_eingang:
      friendly_name: "ZWave - Batterie"
      icon_template: mdi:train
      unit_of_measurement: '%'
      device_class: battery
      value_template: "{{ state_attr('zwave.aeotec_zw130_wallmote_quad', 'battery_level') }}"

If you want a battery icon that automatically reflects the percentage, remove the icon_template.

Your second template is basically doing the same work as state_attr(), but you are using the wrong entity name. states.zwave.aeotec_zw130_wallmote_quadzwave should just be states.zwave.aeotec_zw130_wallmote_quad.

1 Like

Cool :smiley: thank you!