[{"id":"e973fd14a812cdbe","type":"inject","z":"265e4c64d108bbce","name":"holiday on monday","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":266,"y":816,"wires":[["d7275ee916aabcb0"]]},{"id":"8654dfc7bbc182da","type":"inject","z":"265e4c64d108bbce","name":"holiday on tuesday","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":266,"y":864,"wires":[["989f75f06ea00a9d"]]},{"id":"8b75e931b5f4b277","type":"change","z":"265e4c64d108bbce","name":"fake current state (20days)","rules":[{"t":"set","p":"payload","pt":"msg","to":"20","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":504,"y":768,"wires":[["709f22493da3a6dd"]]},{"id":"60ac61ccb795e1c0","type":"inject","z":"265e4c64d108bbce","name":"no holiday","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":236,"y":768,"wires":[["8b75e931b5f4b277"]]},{"id":"d7275ee916aabcb0","type":"change","z":"265e4c64d108bbce","name":"fake current state (6days)","rules":[{"t":"set","p":"payload","pt":"msg","to":"6","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":494,"y":816,"wires":[["709f22493da3a6dd"]]},{"id":"989f75f06ea00a9d","type":"change","z":"265e4c64d108bbce","name":"fake current state (7days)","rules":[{"t":"set","p":"payload","pt":"msg","to":"7","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":494,"y":864,"wires":[["709f22493da3a6dd"]]},{"id":"709f22493da3a6dd","type":"switch","z":"265e4c64d108bbce","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"6","vt":"str"},{"t":"eq","v":"7","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":750,"y":768,"wires":[["7e4d58a33dd4764f"],["7e4d58a33dd4764f"],["b91bdc75361e2e52"]]},{"id":"1b9dd3d89061f046","type":"api-call-service","z":"265e4c64d108bbce","name":"","server":"","version":5,"debugenabled":false,"domain":"calendar","service":"create_event","areaId":[],"deviceId":[],"entityId":["calendar.test"],"data":"{\"summary\": \"Garbage day\", \"description\": payload = 7 ? \"(holiday)\": \"\", \"in\": {\"days\": payload}}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1204,"y":768,"wires":[[]]},{"id":"7e4d58a33dd4764f","type":"change","z":"265e4c64d108bbce","name":"create Wednesday date","rules":[{"t":"set","p":"payload","pt":"msg","to":"7","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":942,"y":768,"wires":[["1b9dd3d89061f046"]]},{"id":"b91bdc75361e2e52","type":"change","z":"265e4c64d108bbce","name":"create Tuesday date","rules":[{"t":"set","p":"payload","pt":"msg","to":"6","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":932,"y":816,"wires":[["1b9dd3d89061f046"]]}]
short version, replace input_number.test
with your holiday sensor id
[{"id":"50407be95aec3e03","type":"api-call-service","z":"265e4c64d108bbce","name":"","server":"","version":5,"debugenabled":false,"domain":"calendar","service":"create_event","areaId":[],"deviceId":[],"entityId":["calendar.test"],"data":"(\t $isHoliday := $number($entities(\"input_number.test\").state) in [6, 7] ? true : false;\t \t {\"summary\": \"Garbage day\", \"description\": $isHoliday ? \"On Wednesday because of holiday\", \"in\": {\"days\": $isHoliday ? 7 : 6}}\t)","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":444,"y":928,"wires":[[]]},{"id":"ab4d9ee75fb8dc84","type":"inject","z":"265e4c64d108bbce","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":228,"y":928,"wires":[["50407be95aec3e03"]]}]