1
0
ansible-home-assistant/templates/shopping-mobile-actions.yaml.j2

18 lines
453 B
Django/Jinja

{% for element in shopping_list %}
# Add {{ element.title }} to shopping list
- id: mobile_action-{{ element.action }}
alias: '[Mobile-action] Shopping {{ element.title }}'
description: ''
mode: single
trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: {{ element.action }}
action:
- service: shopping_list.add_item
data:
name: {{ element.title }}
{% endfor %}