Skip to content

Instantly share code, notes, and snippets.

@dillwishlist
Last active August 21, 2022 17:05
Show Gist options
  • Save dillwishlist/db2ca3421bcc07d255a23d9d70d8c967 to your computer and use it in GitHub Desktop.
Save dillwishlist/db2ca3421bcc07d255a23d9d70d8c967 to your computer and use it in GitHub Desktop.
Companion - BabyBuddy Feeding
{
"version": 2,
"type": "page",
"config": {
"1": {
"style": "png",
"text": "X",
"size": "auto",
"alignment": "center:center",
"pngalignment": "center:center",
"color": 16777215,
"bgcolor": 0,
"latch": false,
"relative_delay": false,
"show_topbar": "default"
},
"2": {
"style": "png",
"text": "-",
"size": "auto",
"alignment": "center:center",
"pngalignment": "center:center",
"color": 16777215,
"bgcolor": 0,
"latch": false,
"relative_delay": false,
"show_topbar": "default"
},
"3": {
"style": "png",
"text": "$(internal:custom_feedQty) ",
"size": "auto",
"alignment": "center:center",
"pngalignment": "center:center",
"color": 16777215,
"bgcolor": 0,
"latch": false,
"relative_delay": false,
"show_topbar": "default"
},
"4": {
"style": "png",
"text": "+",
"size": "auto",
"alignment": "center:center",
"pngalignment": "center:center",
"color": 16777215,
"bgcolor": 0,
"latch": false,
"relative_delay": false,
"show_topbar": "default"
},
"5": {
"style": "png",
"text": "Submit",
"size": "18",
"alignment": "center:center",
"pngalignment": "center:center",
"color": 0,
"bgcolor": 65280,
"latch": false,
"relative_delay": false,
"show_topbar": "default"
},
"6": {},
"7": {},
"8": {},
"9": {
"style": "png",
"text": "Breast Milk",
"size": "auto",
"alignment": "center:center",
"pngalignment": "center:center",
"color": 16777215,
"bgcolor": "0",
"latch": false,
"relative_delay": false,
"show_topbar": "default"
},
"10": {
"style": "png",
"text": "Formula",
"size": "18",
"alignment": "center:center",
"pngalignment": "center:center",
"color": 16777215,
"bgcolor": "0",
"latch": false,
"relative_delay": false,
"show_topbar": "default"
},
"11": {
"style": "png",
"text": "Fortified Breast Milk",
"size": "auto",
"alignment": "center:center",
"pngalignment": "center:center",
"color": 16777215,
"bgcolor": "0",
"latch": false,
"relative_delay": false,
"show_topbar": "default"
},
"12": {
"style": "png",
"text": "Solid Food",
"size": "auto",
"alignment": "center:center",
"pngalignment": "center:center",
"color": 16777215,
"bgcolor": 0,
"latch": false,
"relative_delay": false,
"show_topbar": "default"
},
"13": {},
"14": {},
"15": {},
"16": {},
"17": {
"style": "png",
"text": "Bottle",
"size": "24",
"alignment": "center:center",
"pngalignment": "center:center",
"color": 16777215,
"bgcolor": 0,
"latch": false,
"relative_delay": false,
"show_topbar": "default"
},
"18": {
"style": "png",
"text": "Left Breast",
"size": "auto",
"alignment": "center:center",
"pngalignment": "center:center",
"color": 16777215,
"bgcolor": "0",
"latch": false,
"relative_delay": false,
"show_topbar": "default"
},
"19": {
"style": "png",
"text": "Right Breast",
"size": "auto",
"alignment": "center:center",
"pngalignment": "center:center",
"color": 16777215,
"bgcolor": 0,
"latch": false,
"relative_delay": false,
"show_topbar": "default"
},
"20": {
"style": "png",
"text": "Both Breasts",
"size": "auto",
"alignment": "center:center",
"pngalignment": "center:center",
"color": 16777215,
"bgcolor": 0,
"latch": false,
"relative_delay": false,
"show_topbar": "default"
},
"21": {
"style": "png",
"text": "Parent Fed",
"size": "auto",
"alignment": "center:center",
"pngalignment": "center:center",
"color": 16777215,
"bgcolor": 0,
"latch": false,
"relative_delay": false,
"show_topbar": "default"
},
"22": {
"style": "png",
"text": "Self Fed",
"size": "auto",
"alignment": "center:center",
"pngalignment": "center:center",
"color": 16777215,
"bgcolor": 0,
"latch": false,
"relative_delay": false,
"show_topbar": "default"
},
"23": {},
"24": {},
"25": {},
"26": {},
"27": {},
"28": {},
"29": {},
"30": {},
"31": {},
"32": {}
},
"instances": {
"bitfocus-companion": {
"instance_type": "bitfocus-companion",
"label": "internal",
"id": "bitfocus-companion",
"_configIdx": 2
},
"PEwsshjbw": {
"instance_type": "generic-http",
"product": "HTTP Requests",
"label": "babybuddy",
"_configIdx": 1,
"rejectUnauthorized": true,
"prefix": "http://demo.baby-buddy.net/api/",
"enabled": true
}
},
"actions": {
"1": [
{
"id": "Q29DP7hXq",
"label": "bitfocus-companion:set_page_byindex",
"instance": "bitfocus-companion",
"action": "set_page_byindex",
"options": {
"controller": 1,
"page": 1
},
"delay": 0
}
],
"2": [
{
"id": "BHKQd3VyP",
"label": "bitfocus-companion:custom_variable_math_operation",
"instance": "bitfocus-companion",
"action": "custom_variable_math_operation",
"options": {
"variable": "internal:custom_feedQty",
"operation": "minus",
"value": "1",
"result": "feedQty"
},
"delay": 0
}
],
"3": [],
"4": [
{
"id": "yAkFoufy4",
"label": "bitfocus-companion:custom_variable_math_operation",
"instance": "bitfocus-companion",
"action": "custom_variable_math_operation",
"options": {
"variable": "internal:custom_feedQty",
"operation": "plus",
"value": "1",
"result": "feedQty"
},
"delay": 0
}
],
"5": [
{
"id": "9cq5b4SFp",
"label": "bitfocus-companion:custom_variable_store_variable",
"instance": "bitfocus-companion",
"action": "custom_variable_store_variable",
"options": {
"name": "feedEndDate",
"variable": "internal:date_iso"
},
"delay": 0
},
{
"id": "t9S9i7OW1",
"label": "bitfocus-companion:custom_variable_store_variable",
"instance": "bitfocus-companion",
"action": "custom_variable_store_variable",
"options": {
"name": "feedEndTime",
"variable": "internal:time_hms"
},
"delay": 0
},
{
"id": "YgOKEuFQ3",
"label": "PEwsshjbw:post",
"instance": "PEwsshjbw",
"action": "post",
"options": {
"url": "feedings/",
"body": "{ \"child\":\"1\", \"method\": \"$(internal:custom_feedMethod)\", \"type\": \"$(internal:custom_feedType)\", \"amount\": \"$(internal:custom_feedQty)\", \"start\": \"$(internal:custom_feedStartDate)T$(internal:custom_feedStartTime)\", \"end\": \"$(internal:custom_feedEndDate)T$(internal:custom_feedEndTime)\" }",
"header": "{\"authorization\": \"Token c96f6d55bd5686a26ed3b3e35b675bd28ae51ff4\"}",
"contenttype": "application/json"
},
"delay": 0
},
{
"id": "JV3bT6pper",
"label": "bitfocus-companion:set_page_byindex",
"instance": "bitfocus-companion",
"action": "set_page_byindex",
"options": {
"controller": 1,
"page": 1
},
"delay": 0
}
],
"6": [],
"7": [],
"8": [],
"9": [
{
"id": "ec1o1Mbx7",
"label": "bitfocus-companion:custom_variable_set_value",
"instance": "bitfocus-companion",
"action": "custom_variable_set_value",
"options": {
"name": "feedType",
"value": "breast milk"
},
"delay": 0
}
],
"10": [
{
"id": "yEOJVNlcS",
"label": "bitfocus-companion:custom_variable_set_value",
"instance": "bitfocus-companion",
"action": "custom_variable_set_value",
"options": {
"name": "feedType",
"value": "formula"
},
"delay": 0
}
],
"11": [
{
"id": "887tduSHW",
"label": "bitfocus-companion:custom_variable_set_value",
"instance": "bitfocus-companion",
"action": "custom_variable_set_value",
"options": {
"name": "feedType",
"value": "fortified breast milk"
},
"delay": 0
}
],
"12": [
{
"id": "P5dj8vXSb",
"label": "bitfocus-companion:custom_variable_set_value",
"instance": "bitfocus-companion",
"action": "custom_variable_set_value",
"options": {
"name": "feedType",
"value": "solid food"
},
"delay": 0
}
],
"13": [],
"14": [],
"15": [],
"16": [],
"17": [
{
"id": "t43WDGSFE",
"label": "bitfocus-companion:custom_variable_set_value",
"instance": "bitfocus-companion",
"action": "custom_variable_set_value",
"options": {
"name": "feedMethod",
"value": "bottle"
},
"delay": 0
}
],
"18": [
{
"id": "fyePk8is2",
"label": "bitfocus-companion:custom_variable_set_value",
"instance": "bitfocus-companion",
"action": "custom_variable_set_value",
"options": {
"name": "feedMethod",
"value": "left breast"
},
"delay": 0
}
],
"19": [
{
"id": "g0l7WjEt9",
"label": "bitfocus-companion:custom_variable_set_value",
"instance": "bitfocus-companion",
"action": "custom_variable_set_value",
"options": {
"name": "feedMethod",
"value": "right breast"
},
"delay": 0
}
],
"20": [
{
"id": "h5D11MZBu",
"label": "bitfocus-companion:custom_variable_set_value",
"instance": "bitfocus-companion",
"action": "custom_variable_set_value",
"options": {
"name": "feedMethod",
"value": "both breasts"
},
"delay": 0
}
],
"21": [
{
"id": "TMp-TM7S1",
"label": "bitfocus-companion:custom_variable_set_value",
"instance": "bitfocus-companion",
"action": "custom_variable_set_value",
"options": {
"name": "feedMethod",
"value": "parent fed"
},
"delay": 0
}
],
"22": [
{
"id": "f_-Gnk1CW",
"label": "bitfocus-companion:custom_variable_set_value",
"instance": "bitfocus-companion",
"action": "custom_variable_set_value",
"options": {
"name": "feedMethod",
"value": "self fed"
},
"delay": 0
}
],
"23": [],
"24": [],
"25": [],
"26": [],
"27": [],
"28": [],
"29": [],
"30": [],
"31": [],
"32": []
},
"release_actions": {
"1": [],
"2": [],
"3": [],
"4": [],
"5": [],
"6": [],
"7": [],
"8": [],
"9": [],
"10": [],
"11": [],
"12": [],
"13": [],
"14": [],
"15": [],
"16": [],
"17": [],
"18": [],
"19": [],
"20": [],
"21": [],
"22": [],
"23": [],
"24": [],
"25": [],
"26": [],
"27": [],
"28": [],
"29": [],
"30": [],
"31": [],
"32": []
},
"feedbacks": {
"1": [],
"2": [],
"3": [],
"4": [],
"5": [],
"9": [
{
"id": "fJTrRz6zd",
"type": "variable_value",
"instance_id": "bitfocus-companion",
"options": {
"variable": "internal:custom_feedType",
"op": "eq",
"value": "breast milk"
},
"style": {
"color": 16777215,
"bgcolor": 12632319
}
}
],
"10": [
{
"id": "fXFg2H8lf",
"type": "variable_value",
"instance_id": "bitfocus-companion",
"options": {
"variable": "internal:custom_feedType",
"op": "eq",
"value": "formula"
},
"style": {
"color": 16777215,
"bgcolor": 12632319
}
}
],
"11": [
{
"id": "8nuVsmypT",
"type": "variable_value",
"instance_id": "bitfocus-companion",
"options": {
"variable": "internal:custom_feedType",
"op": "eq",
"value": "fortified breast milk"
},
"style": {
"color": 16777215,
"bgcolor": 12632319
}
}
],
"12": [
{
"id": "13Gj8DchD",
"type": "variable_value",
"instance_id": "bitfocus-companion",
"options": {
"variable": "internal:custom_feedType",
"op": "eq",
"value": "solid food"
},
"style": {
"color": 16777215,
"bgcolor": 12632319
}
}
],
"17": [
{
"id": "6GN9LGteT",
"type": "variable_value",
"instance_id": "bitfocus-companion",
"options": {
"variable": "internal:custom_feedMethod",
"op": "eq",
"value": "bottle"
},
"style": {
"color": 16777215,
"bgcolor": 16761087
}
}
],
"18": [
{
"id": "U_Z_ZxqXE",
"type": "variable_value",
"instance_id": "bitfocus-companion",
"options": {
"variable": "internal:custom_feedMethod",
"op": "eq",
"value": "left breast"
},
"style": {
"color": 16777215,
"bgcolor": 16761087
}
}
],
"19": [
{
"id": "J00QNpmqF",
"type": "variable_value",
"instance_id": "bitfocus-companion",
"options": {
"variable": "internal:custom_feedMethod",
"op": "eq",
"value": "right breast"
},
"style": {
"color": 16777215,
"bgcolor": 16761087
}
}
],
"20": [
{
"id": "FV1thtTRi",
"type": "variable_value",
"instance_id": "bitfocus-companion",
"options": {
"variable": "internal:custom_feedMethod",
"op": "eq",
"value": "both breasts"
},
"style": {
"color": 16777215,
"bgcolor": 16761087
}
}
],
"21": [
{
"id": "4MBsOLtyt",
"type": "variable_value",
"instance_id": "bitfocus-companion",
"options": {
"variable": "internal:custom_feedMethod",
"op": "eq",
"value": "parent fed"
},
"style": {
"color": 16777215,
"bgcolor": 16761087
}
}
],
"22": [
{
"id": "uUuOPXwq3",
"type": "variable_value",
"instance_id": "bitfocus-companion",
"options": {
"variable": "internal:custom_feedMethod",
"op": "eq",
"value": "self fed"
},
"style": {
"color": 16777215,
"bgcolor": 16761087
}
}
]
},
"page": {
"name": "Feed"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment