Shopping buttons
This commit is contained in:
parent
a8df96a1d6
commit
c1cdf0e2e8
85
configuration/automations/shopping.yaml
Normal file
85
configuration/automations/shopping.yaml
Normal file
@ -0,0 +1,85 @@
|
||||
- id: kitchen_shopping_oatmeal
|
||||
alias: '[Kitchen][Shopping] Oatmeal'
|
||||
trigger:
|
||||
- device_id: 99f942bf6462d2372012278e086721bf
|
||||
domain: zha
|
||||
platform: device
|
||||
type: remote_button_short_press
|
||||
subtype: remote_button_short_press
|
||||
condition: [ ]
|
||||
action:
|
||||
- service: shopping_list.add_item
|
||||
data:
|
||||
name: Płatki owsiane
|
||||
|
||||
- id: kitchen_shopping_pasta
|
||||
alias: '[Kitchen][Shopping] Pasta'
|
||||
trigger:
|
||||
- device_id: 75e43fd0f6c82fb9e7bc6ff7c30b8c9a
|
||||
domain: zha
|
||||
platform: device
|
||||
type: remote_button_short_press
|
||||
subtype: remote_button_short_press
|
||||
condition: [ ]
|
||||
action:
|
||||
- service: shopping_list.add_item
|
||||
data:
|
||||
name: Makaron pełnoziarnisty
|
||||
|
||||
- id: kitchen_shopping_spices
|
||||
alias: '[Kitchen][Shopping] Spices'
|
||||
trigger:
|
||||
- device_id: 75e43fd0f6c82fb9e7bc6ff7c30b8c9a
|
||||
domain: zha
|
||||
platform: device
|
||||
type: remote_button_short_press
|
||||
subtype: remote_button_short_press
|
||||
condition: [ ]
|
||||
action:
|
||||
- service: notify.mobile_app_iphone
|
||||
data:
|
||||
message: Co dodać do listy zakupów?
|
||||
data:
|
||||
actions:
|
||||
- action: SHOPPING_BASIL
|
||||
title: Bazylia
|
||||
- action: SHOPPING_OREGANO
|
||||
title: Oregano
|
||||
- action: SHOPPING_THYMELEAF
|
||||
title: Tymianek
|
||||
- action: SHOPPING_WHITE_PEPPER
|
||||
title: Pieprz biały
|
||||
- action: SHOPPING_BLACK_PEPPER
|
||||
title: Pieprz czarny
|
||||
- action: SHOPPING_SWEET_PEPPER
|
||||
title: Sweet pepper
|
||||
- action: SHOPPING_GARLIC
|
||||
title: Czosnek
|
||||
- action: SHOPPING_SALT
|
||||
title: Sól
|
||||
|
||||
- id: kitchen_shopping_coffee_supplies
|
||||
alias: '[Kitchen][Shopping] Coffee Supplies'
|
||||
trigger:
|
||||
- device_id: 75e43fd0f6c82fb9e7bc6ff7c30b8c9a
|
||||
domain: zha
|
||||
platform: device
|
||||
type: remote_button_short_press
|
||||
subtype: remote_button_short_press
|
||||
condition: [ ]
|
||||
action:
|
||||
- service: notify.mobile_app_iphone
|
||||
data:
|
||||
message: Co dodać do listy zakupów?
|
||||
data:
|
||||
actions:
|
||||
- action: SHOPPING_COFFEE
|
||||
title: Kawa
|
||||
- action: SHOPPING_COFFEE_WATER_FILTER
|
||||
title: Filtr do wody ekspresu
|
||||
- action: SHOPPING_COFFEE_DESCALER
|
||||
title: Odkamieniacz do ekspresu
|
||||
- action: SHOPPING_COFFEE_CLEANING_TABLETS
|
||||
title: Tabletki czyszczące do ekspresu
|
||||
- action: SHOPPING_COFFEE_MILK_CLEANER
|
||||
title: Środek do czyszczenia mleka ekspresu
|
@ -35,6 +35,39 @@
|
||||
name: Desk Lightbar
|
||||
- entityId: light.office
|
||||
name: Table lamp
|
||||
- name: Build spices shopping automations
|
||||
delegate_to: localhost
|
||||
template:
|
||||
src: shopping-mobile-actions.yaml.j2
|
||||
dest: './build/automations/shopping-mobile-actions.yaml'
|
||||
vars:
|
||||
shopping_list:
|
||||
- action: SHOPPING_COFFEE
|
||||
title: Kawa
|
||||
- action: SHOPPING_COFFEE_WATER_FILTER
|
||||
title: Filtr do wody ekspresu
|
||||
- action: SHOPPING_COFFEE_DESCALER
|
||||
title: Odkamieniacz do ekspresu
|
||||
- action: SHOPPING_COFFEE_CLEANING_TABLETS
|
||||
title: Tabletki czyszczące do ekspresu
|
||||
- action: SHOPPING_COFFEE_MILK_CLEANER
|
||||
title: Środek do czyszczenia mleka ekspresu
|
||||
- action: SHOPPING_BASIL
|
||||
title: Bazylia
|
||||
- action: SHOPPING_OREGANO
|
||||
title: Oregano
|
||||
- action: SHOPPING_THYMELEAF
|
||||
title: Tymianek
|
||||
- action: SHOPPING_WHITE_PEPPER
|
||||
title: Pieprz biały
|
||||
- action: SHOPPING_BLACK_PEPPER
|
||||
title: Pieprz czarny
|
||||
- action: SHOPPING_SWEET_PEPPER
|
||||
title: Sweet pepper
|
||||
- action: SHOPPING_GARLIC
|
||||
title: Czosnek
|
||||
- action: SHOPPING_SALT
|
||||
title: Sól
|
||||
- name: Concat automation 2
|
||||
ansible.builtin.assemble:
|
||||
remote_src: no
|
||||
|
17
templates/shopping-mobile-actions.yaml.j2
Normal file
17
templates/shopping-mobile-actions.yaml.j2
Normal file
@ -0,0 +1,17 @@
|
||||
{% 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 %}
|
Loading…
Reference in New Issue
Block a user