I am trying to create a weekly report where all z-wave devices battery attribute is sent in an email. Unfortunately not working.
- alias: Batt_report
hide_entity: True
trigger:
- platform: template
value_template: >
{% for zwave in states.zwave if zwave.attributes.battery_level %}
{%- if zwave.attributes.battery_level | int < 101 -%}
{{true}}
{%- endif -%}
{%- endfor -%}
condition:
condition: time
weekday:
- wed
at: '18:15:00'
action:
- service: notify.gmail
data:
Title: Weekly Z-wave battery report
message: >
{{ trigger.to_state.attributes.friendly_name }} has battery level: {{trigger.to_state.attributes.battery_level}}
The fault from configuration check:
Invalid config for [automation]: extra keys not allowed @ data[‘condition’][0][‘conditions’][1][‘at’]. Got None
not a valid value for dictionary value @ data[‘condition’][0][‘conditions’][1][‘condition’]. Got None
required key not provided @ data[‘condition’][0][‘conditions’][1][‘entity_id’]. Got None. (See /home/homeassistant/.homeassistant/configuration.yaml, line 247). Please check the docs at https://home-assistant.io/components/automation/
Any suggestions?