mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-10 02:50:12 -04:00
219 lines
4.9 KiB
YAML
219 lines
4.9 KiB
YAML
input_select:
|
|
grocy_users:
|
|
name: Grocy Users
|
|
icon: mdi:account-multiple
|
|
options:
|
|
- Daddy
|
|
- Chickadee
|
|
- Marshall
|
|
- Tess
|
|
- Emmett
|
|
- Bridget
|
|
- Ebin
|
|
|
|
grocy_purchase:
|
|
name: Purchase via Grocy
|
|
icon: mdi:form-dropdown
|
|
options:
|
|
- KCups
|
|
- Dishwashing Tablets
|
|
- Diet Coke
|
|
|
|
grocy_consume:
|
|
name: Consume via Grocy
|
|
icon: mdi:form-dropdown
|
|
options:
|
|
- KCups
|
|
- Dishwashing Tablets
|
|
- Diet Coke
|
|
|
|
input_number:
|
|
grocy_consume_purchase:
|
|
name: Grocy Consume or Purchase
|
|
icon: mdi:tally-mark-5
|
|
min: 0
|
|
max: 200
|
|
mode: box
|
|
|
|
automation:
|
|
- id: grocy_consume_dishwasher_tablet
|
|
alias: Consume Dishwasher Tablet
|
|
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.dishwasher
|
|
to: 'on'
|
|
for:
|
|
minutes: 10
|
|
|
|
action:
|
|
- alias: "Consume 1 Dishwasher tablet"
|
|
service: grocy.consume_product_from_stock
|
|
data:
|
|
transaction_type: CONSUME
|
|
product_id: 14
|
|
amount: 1
|
|
|
|
|
|
- id: grocy_purchase_am_meds
|
|
alias: 'Purchase AM Meds'
|
|
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_button.grocy_purchase_am_meds
|
|
|
|
action:
|
|
alias: Add 30 AM Meds to stock
|
|
service: grocy.add_product_to_stock
|
|
data:
|
|
product_id: 17
|
|
amount: 30
|
|
|
|
- id: grocy_clint_consume_am_meds
|
|
alias: Clint Consume AM Meds
|
|
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_button.grocy_consume_am_meds
|
|
|
|
- platform: state
|
|
entity_id: input_boolean.clint_needs_am_meds
|
|
from: 'on'
|
|
to: 'off'
|
|
|
|
action:
|
|
- alias: "Clint consume AM meds"
|
|
service: grocy.consume_product_from_stock
|
|
data:
|
|
transaction_type: CONSUME
|
|
product_id: 17
|
|
amount: 1
|
|
|
|
- id: grocy_purchase_pm_meds
|
|
alias: 'Purchase PM Meds'
|
|
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_button.grocy_purchase_pm_meds
|
|
|
|
action:
|
|
alias: Add 30 PM Meds to stock
|
|
service: grocy.add_product_to_stock
|
|
data:
|
|
product_id: 18
|
|
amount: 30
|
|
|
|
- id: grocy_clint_consume_pm_meds
|
|
alias: 'Clint Consume PM Meds'
|
|
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_button.grocy_consume_pm_meds
|
|
|
|
- platform: state
|
|
entity_id: input_boolean.clint_needs_pm_meds
|
|
from: 'on'
|
|
to: 'off'
|
|
|
|
action:
|
|
- alias: "Clint consume PM meds"
|
|
service: grocy.consume_product_from_stock
|
|
data:
|
|
transaction_type: CONSUME
|
|
product_id: 18
|
|
amount: 1
|
|
|
|
- id: grocy_manage_milk
|
|
alias: 'Manage Milk'
|
|
|
|
trigger:
|
|
- id: 'consume_milk'
|
|
platform: state
|
|
entity_id: input_button.grocy_consume_milk
|
|
|
|
- id: 'purchase_milk'
|
|
platform: state
|
|
entity_id: input_button.grocy_purchase_milk
|
|
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: consume_milk
|
|
sequence:
|
|
- alias: "Consume gallon of milk"
|
|
service: grocy.consume_product_from_stock
|
|
data:
|
|
transaction_type: CONSUME
|
|
product_id: 33
|
|
amount: 128
|
|
- conditions:
|
|
- condition: trigger
|
|
id: purchase_milk
|
|
sequence:
|
|
- alias: "Purchase gallon of milk"
|
|
service: grocy.add_product_to_stock
|
|
data:
|
|
product_id: 33
|
|
amount: 128
|
|
|
|
- id: grocy_manage_diet_coke
|
|
alias: 'Manage Diet Coke'
|
|
|
|
trigger:
|
|
- id: 'consume'
|
|
platform: state
|
|
entity_id: input_button.grocy_consume_diet_coke
|
|
|
|
- id: 'purchase'
|
|
platform: state
|
|
entity_id: input_button.grocy_purchase_diet_coke_12_pack
|
|
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: consume
|
|
sequence:
|
|
- alias: "Consume Diet Coke"
|
|
service: grocy.consume_product_from_stock
|
|
data:
|
|
transaction_type: CONSUME
|
|
product_id: 21
|
|
amount: 1
|
|
- conditions:
|
|
- condition: trigger
|
|
id: purchase
|
|
sequence:
|
|
- alias: "Purchase 12 pack of Diet Coke"
|
|
service: grocy.add_product_to_stock
|
|
data:
|
|
product_id: 21
|
|
amount: 12
|
|
|
|
- id: grocy_consume_kcup
|
|
alias: 'Consume K-Cup'
|
|
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_button.grocy_consume_kcup
|
|
|
|
action:
|
|
- alias: "Consume KCup"
|
|
service: grocy.consume_product_from_stock
|
|
data:
|
|
transaction_type: CONSUME
|
|
product_id: 20
|
|
amount: 1
|
|
|
|
# script:
|
|
# consume_kcup:
|
|
# alias: Consume K-Cup
|
|
# sequence:
|
|
# - alias: "Consume K-Cup"
|
|
# service: grocy.consume_product_from_stock
|
|
# data:
|
|
# transaction_type: CONSUME
|
|
# product_id: 20
|
|
# amount: 1
|