326 lines
14 KiB
JSON
326 lines
14 KiB
JSON
[
|
|
{
|
|
"id": "toggle_office_lamp_light",
|
|
"automation": "- id: toggle_office_lamp_light\n alias: Toggle Office Lamp Light\n description: ''\n triggers:\n - trigger: event\n event_type: smartthings.button\n event_data:\n device_id: d11abf41-3b05-4389-865d-90272f94d0fe\n value: pushed\n condition: []\n action:\n - type: toggle\n device_id: 3d28c5055698c2dd847cc825f36218f4\n entity_id: 15ae762e8d5c402c6a1251d3cb762e27\n domain: light\n mode: single",
|
|
"config": [
|
|
{
|
|
"name": "office lamp light",
|
|
"room": "office",
|
|
"type": "light",
|
|
"id": {
|
|
"entity_id": "15ae762e8d5c402c6a1251d3cb762e27",
|
|
"device_id": "3d28c5055698c2dd847cc825f36218f4"
|
|
}
|
|
},
|
|
{
|
|
"name": "smartthings button",
|
|
"room": "office",
|
|
"type": "device",
|
|
"id": {
|
|
"entity_id": null,
|
|
"device_id": "d11abf41-3b05-4389-865d-90272f94d0fe"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "sync_filter_counters",
|
|
"automation": "- id: sync_filter_counters\n alias: Sync Filter Counters\n description: Synchronizes all filter counters with input text values\n triggers:\n - trigger: state\n entity_id:\n - input_text.water_filter_custom_number\n - input_text.furnace_filter_custom_number\n - input_text.litter_box_litter_custom_number\n - input_text.litter_box_pee_pad_custom_number\n conditions: []\n actions:\n - choose:\n - conditions:\n - condition: template\n value_template: '{{ trigger.entity_id == ''input_text.water_filter_custom_number''\n }}'\n sequence:\n - action: counter.set_value\n target:\n entity_id: counter.water_filter_counter\n data:\n value: '{{ trigger.to_state.state | int(default=0) }}'\n - conditions:\n - condition: template\n value_template: '{{ trigger.entity_id == ''input_text.furnace_filter_custom_number''\n }}'\n sequence:\n - action: counter.set_value\n target:\n entity_id: counter.furnace_filter_counter\n data:\n value: '{{ trigger.to_state.state | int(default=0) }}'\n - conditions:\n - condition: template\n value_template: '{{ trigger.entity_id == ''input_text.litter_box_litter_custom_number''\n }}'\n sequence:\n - action: counter.set_value\n target:\n entity_id: counter.litter_box_litter_counter\n data:\n value: '{{ trigger.to_state.state | int(default=0) }}'\n - conditions:\n - condition: template\n value_template: '{{ trigger.entity_id == ''input_text.litter_box_pee_pad_custom_number''\n }}'\n sequence:\n - action: counter.set_value\n target:\n entity_id: counter.litter_box_pee_pad_counter\n data:\n value: '{{ trigger.to_state.state | int(default=0) }}'\n mode: single",
|
|
"config": [
|
|
{
|
|
"name": "water filter custom number",
|
|
"room": null,
|
|
"type": "input_text",
|
|
"id": {
|
|
"entity_id": "input_text.water_filter_custom_number",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "furnace filter custom number",
|
|
"room": null,
|
|
"type": "input_text",
|
|
"id": {
|
|
"entity_id": "input_text.furnace_filter_custom_number",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "litter box litter custom number",
|
|
"room": null,
|
|
"type": "input_text",
|
|
"id": {
|
|
"entity_id": "input_text.litter_box_litter_custom_number",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "litter box pee pad custom number",
|
|
"room": null,
|
|
"type": "input_text",
|
|
"id": {
|
|
"entity_id": "input_text.litter_box_pee_pad_custom_number",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "water filter counter",
|
|
"room": null,
|
|
"type": "counter",
|
|
"id": {
|
|
"entity_id": "counter.water_filter_counter",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "furnace filter counter",
|
|
"room": null,
|
|
"type": "counter",
|
|
"id": {
|
|
"entity_id": "counter.furnace_filter_counter",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "litter box litter counter",
|
|
"room": null,
|
|
"type": "counter",
|
|
"id": {
|
|
"entity_id": "counter.litter_box_litter_counter",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "litter box pee pad counter",
|
|
"room": null,
|
|
"type": "counter",
|
|
"id": {
|
|
"entity_id": "counter.litter_box_pee_pad_counter",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "update_days_since_reset",
|
|
"automation": "- id: update_days_since_reset\n alias: Update Days Since Reset\n description: Increments all counters daily unless reset occurred\n triggers:\n - trigger: time\n at: 00:01:00\n condition: []\n actions:\n - if:\n - condition: template\n value_template: '{% set last_reset = states(''input_datetime.water_filter_last_reset'')\n %} {{ last_reset not in [''unknown'', ''unavailable'', ''''] and (now().date()\n - as_datetime(last_reset).date()).days > 0 }}\n\n '\n then:\n - action: counter.increment\n target:\n entity_id: counter.water_filter_counter\n - if:\n - condition: template\n value_template: '{{ states(''input_datetime.furnace_filter_last_reset'') not\n in [''unknown'', ''unavailable'', ''''] }}'\n then:\n - action: counter.increment\n target:\n entity_id: counter.furnace_filter_counter\n - if:\n - condition: template\n value_template: '{{ states(''input_datetime.litter_box_litter_last_reset'')\n not in [''unknown'', ''unavailable'', ''''] }}'\n then:\n - action: counter.increment\n target:\n entity_id: counter.litter_box_litter_counter\n - if:\n - condition: template\n value_template: '{{ states(''input_datetime.litter_box_pee_pad_last_reset'')\n not in [''unknown'', ''unavailable'', ''''] }}'\n then:\n - action: counter.increment\n target:\n entity_id: counter.litter_box_pee_pad_counter\n mode: single",
|
|
"config": [
|
|
{
|
|
"name": "water filter counter",
|
|
"room": null,
|
|
"type": "counter",
|
|
"id": {
|
|
"entity_id": "counter.water_filter_counter",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "furnace filter counter",
|
|
"room": null,
|
|
"type": "counter",
|
|
"id": {
|
|
"entity_id": "counter.furnace_filter_counter",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "litter box litter counter",
|
|
"room": null,
|
|
"type": "counter",
|
|
"id": {
|
|
"entity_id": "counter.litter_box_litter_counter",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "litter box pee pad counter",
|
|
"room": null,
|
|
"type": "counter",
|
|
"id": {
|
|
"entity_id": "counter.litter_box_pee_pad_counter",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "water filter last reset",
|
|
"room": null,
|
|
"type": "input_datetime",
|
|
"id": {
|
|
"entity_id": "input_datetime.water_filter_last_reset",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "furnace filter last reset",
|
|
"room": null,
|
|
"type": "input_datetime",
|
|
"id": {
|
|
"entity_id": "input_datetime.furnace_filter_last_reset",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "litter box litter last reset",
|
|
"room": null,
|
|
"type": "input_datetime",
|
|
"id": {
|
|
"entity_id": "input_datetime.litter_box_litter_last_reset",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "litter box pee pad last reset",
|
|
"room": null,
|
|
"type": "input_datetime",
|
|
"id": {
|
|
"entity_id": "input_datetime.litter_box_pee_pad_last_reset",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "sync_litter_box_days",
|
|
"automation": "- id: sync_litter_box_days\n alias: Sync Litter Box Days\n description: Synchronizes the litter box counter with input number\n triggers:\n - trigger: state\n entity_id: input_number.litter_box_litter_days\n condition: []\n actions:\n - action: counter.set_value\n target:\n entity_id: counter.litter_box_litter_counter\n data:\n value: '{{ states(''input_number.litter_box_litter_days'') | int }}'\n mode: single",
|
|
"config": [
|
|
{
|
|
"name": "litter box litter counter",
|
|
"room": null,
|
|
"type": "counter",
|
|
"id": {
|
|
"entity_id": "counter.litter_box_litter_counter",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "litter box litter days",
|
|
"room": null,
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.litter_box_litter_days",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "sync_pee_pad_days",
|
|
"automation": "- id: sync_pee_pad_days\n alias: Sync Pee Pad Days\n description: Synchronizes the pee pad counter with input number\n triggers:\n - trigger: state\n entity_id: input_number.litter_box_pee_pad_days\n condition: []\n actions:\n - action: counter.set_value\n target:\n entity_id: counter.litter_box_pee_pad_counter\n data:\n value: '{{ states(''input_number.litter_box_pee_pad_days'') | int }}'\n mode: single",
|
|
"config": [
|
|
{
|
|
"name": "litter box pee pad counter",
|
|
"room": null,
|
|
"type": "counter",
|
|
"id": {
|
|
"entity_id": "counter.litter_box_pee_pad_counter",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "litter box pee pad days",
|
|
"room": null,
|
|
"type": "input_number",
|
|
"id": {
|
|
"entity_id": "input_number.litter_box_pee_pad_days",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "reset_counters_via_nfc",
|
|
"automation": "- id: reset_counters_via_nfc\n alias: Reset Counters via NFC\n description: Prompts for confirmation and resets the respective counter when an\n NFC tag is scanned.\n triggers:\n - trigger: event\n event_type: tag_scanned\n conditions: []\n actions:\n - choose:\n - conditions:\n - condition: template\n value_template: '{{ trigger.event.data.tag_id == ''72386f3a-3089-4ca9-a90c-a7c3f26d7847''\n }}'\n sequence:\n - action: notify.mobile_app_your_iphone\n data:\n message: Did you replace the litter in Blue's litter box?\n title: Reset Litter Counter?\n data:\n push:\n category: reset_litter\n actions:\n - action: RESET_LITTER\n title: 'Yes'\n destructive: false\n - action: IGNORE\n title: 'No'\n destructive: false\n - wait_for_trigger:\n - trigger: event\n event_type: mobile_app_notification_action\n event_data:\n action: RESET_LITTER\n timeout: 00:30:00\n continue_on_timeout: false\n - action: counter.reset\n target:\n entity_id: counter.litter_box_litter_counter\n - action: notify.mobile_app_iHefe\n data:\n title: Litter Counter Reset\n message: The litter counter has been reset successfully! Blue says thanks!\n - conditions:\n - condition: template\n value_template: '{{ trigger.event.data.tag_id == ''8b2662cc-3e35-47c8-a5df-3f9f63b31b9b''\n }}'\n sequence:\n - action: counter.reset\n target:\n entity_id: counter.litter_box_pee_pad_counter\n - conditions:\n - condition: template\n value_template: '{{ trigger.event.data.tag_id == ''9d3bd791-8e1c-43f3-939a-716695092f24''\n }}'\n sequence:\n - action: counter.reset\n target:\n entity_id: counter.water_filter_counter\n - conditions:\n - condition: template\n value_template: '{{ trigger.event.data.tag_id == ''fb0949aa-ed18-46f0-bea2-e5c47116528a''\n }}'\n sequence:\n - action: counter.reset\n target:\n entity_id: counter.furnace_filter_counter\n mode: single",
|
|
"config": [
|
|
{
|
|
"name": "water filter counter",
|
|
"room": null,
|
|
"type": "counter",
|
|
"id": {
|
|
"entity_id": "counter.water_filter_counter",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "furnace filter counter",
|
|
"room": null,
|
|
"type": "counter",
|
|
"id": {
|
|
"entity_id": "counter.furnace_filter_counter",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "litter box litter counter",
|
|
"room": null,
|
|
"type": "counter",
|
|
"id": {
|
|
"entity_id": "counter.litter_box_litter_counter",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "litter box pee pad counter",
|
|
"room": null,
|
|
"type": "counter",
|
|
"id": {
|
|
"entity_id": "counter.litter_box_pee_pad_counter",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "litter reset nfc tag",
|
|
"room": null,
|
|
"type": "tag",
|
|
"id": {
|
|
"entity_id": "72386f3a-3089-4ca9-a90c-a7c3f26d7847",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "pee pad reset nfc tag",
|
|
"room": null,
|
|
"type": "tag",
|
|
"id": {
|
|
"entity_id": "8b2662cc-3e35-47c8-a5df-3f9f63b31b9b",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "water filter reset nfc tag",
|
|
"room": null,
|
|
"type": "tag",
|
|
"id": {
|
|
"entity_id": "9d3bd791-8e1c-43f3-939a-716695092f24",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "furnace filter reset nfc tag",
|
|
"room": null,
|
|
"type": "tag",
|
|
"id": {
|
|
"entity_id": "fb0949aa-ed18-46f0-bea2-e5c47116528a",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "mobile app your iphone",
|
|
"room": null,
|
|
"type": "notify",
|
|
"id": {
|
|
"entity_id": "notify.mobile_app_your_iphone",
|
|
"device_id": null
|
|
}
|
|
},
|
|
{
|
|
"name": "mobile app iHefe",
|
|
"room": null,
|
|
"type": "notify",
|
|
"id": {
|
|
"entity_id": "notify.mobile_app_iHefe",
|
|
"device_id": null
|
|
}
|
|
}
|
|
]
|
|
}
|
|
] |