Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias: Notifica Lista Spesa
- description: ""
- trigger:
- - platform: state
- entity_id:
- - todo.alexa_shopping_list
- condition:
- - condition: template
- value_template: >-
- {{ (trigger.from_state.state|int(0) < trigger.to_state.state|int(0)) and
- (trigger.from_state.state != 'unavailable' and trigger.to_state.state !=
- 'none') and (trigger.to_state.state != 'unavailable' and
- trigger.from_state.state != 'none') }}
- action:
- - service: todo.get_items
- target:
- entity_id: todo.alexa_shopping_list
- data:
- status: needs_action
- response_variable: shoppinglist
- - service: notify.casa
- data:
- message: >
- Lista Spesa aggiornata: {{'🛒'}} {%- for item in
- shoppinglist['todo.alexa_shopping_list']['items'] %}
- - {{ item.summary }}
- {%- endfor %}
- mode: single
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement