Skip to main content

Automations

Here you'll find a collection of ready-to-use automation examples for your installation. These automations are designed specifically for Node-RED. Simply copy the provided code and replace the example entities with your own.

tip

If you've created an automation you'd like to share, please open an issue on GitHub — I'll review it and consider adding it to the list.


Automatically shift door to vent position if temperature surpasses threshold.

This automation will move the garage door to vent position, if the temperature exceeds 35°C for over 10 minutes.

[{"id":"e10450ac006bab70","type":"server-state-changed","z":"fc01db6cebc7488d","name":"Garage Temperature over 35°C for 10 minutes","server":"49b5425d.9340cc","version":6,"outputs":2,"exposeAsEntityConfig":"","entities":{"entity":["sensor.pandagarage_0904_temperature"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"35","ifStateType":"num","ifStateOperator":"gte","outputOnlyOnStateChange":true,"for":"10","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[],"x":290,"y":460,"wires":[["f7fddb4b549ba4d0"],[]]},{"id":"7781b5203790211a","type":"api-call-service","z":"fc01db6cebc7488d","name":"Move door to vent position","server":"49b5425d.9340cc","version":7,"debugenabled":false,"action":"button.press","floorId":[],"areaId":[],"deviceId":[],"entityId":["button.pandagarage_0904_vent_position"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":true,"domain":"button","service":"press","x":840,"y":460,"wires":[[]]},{"id":"f7fddb4b549ba4d0","type":"api-current-state","z":"fc01db6cebc7488d","name":"Is door open?","server":"49b5425d.9340cc","version":3,"outputs":2,"halt_if":"open","halt_if_type":"str","halt_if_compare":"is","entity_id":"cover.pandagarage_0904_door","state_type":"str","blockInputOverrides":true,"outputProperties":[],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":600,"y":460,"wires":[[],["7781b5203790211a"]]},{"id":"49b5425d.9340cc","type":"server","name":"Home Assistant","addon":true}]

This one will close the door if temperature is under 30°C for 10 minutes and the door is currently in vent position.

[{"id":"463283d80e8e8482","type":"server-state-changed","z":"fc01db6cebc7488d","name":"Garage Temperature under 30°C for 10 minutes","server":"49b5425d.9340cc","version":6,"outputs":2,"exposeAsEntityConfig":"","entities":{"entity":["sensor.pandagarage_0904_temperature"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"30","ifStateType":"num","ifStateOperator":"lte","outputOnlyOnStateChange":true,"for":"10","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[],"x":300,"y":540,"wires":[["7be909b9957e588c"],[]]},{"id":"ec8e537eff23e2c8","type":"api-call-service","z":"fc01db6cebc7488d","name":"Close door","server":"49b5425d.9340cc","version":7,"debugenabled":false,"action":"cover.close_cover","floorId":[],"areaId":[],"deviceId":[],"entityId":["cover.pandagarage_0904_door"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":true,"domain":"cover","service":"close_cover","x":1050,"y":540,"wires":[[]]},{"id":"7be909b9957e588c","type":"api-current-state","z":"fc01db6cebc7488d","name":"Is door open?","server":"49b5425d.9340cc","version":3,"outputs":2,"halt_if":"open","halt_if_type":"str","halt_if_compare":"is","entity_id":"cover.pandagarage_0904_door","state_type":"str","blockInputOverrides":true,"outputProperties":[{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":600,"y":540,"wires":[["6e08c1837ce917dc"],[]]},{"id":"6e08c1837ce917dc","type":"switch","z":"fc01db6cebc7488d","name":"Is door in vent position?","property":"data.new_state.attributes.current_position","propertyType":"msg","rules":[{"t":"eq","v":"4","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":830,"y":540,"wires":[["ec8e537eff23e2c8"]]},{"id":"49b5425d.9340cc","type":"server","name":"Home Assistant","addon":true}]

Receive a notification when the door is opened or closed

These automations create a normal notification for opening / closing the garage door.

Open Alert:

[{"id":"70d94add1092a077","type":"server-state-changed","z":"fc01db6cebc7488d","name":"Door opened","server":"49b5425d.9340cc","version":6,"outputs":2,"exposeAsEntityConfig":"","entities":{"entity":["cover.pandagarage_0904_door"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"open","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[],"x":190,"y":280,"wires":[["616f4b0c5a92e67f"],[]]},{"id":"616f4b0c5a92e67f","type":"api-call-service","z":"fc01db6cebc7488d","name":"","server":"49b5425d.9340cc","version":7,"debugenabled":false,"action":"notify.mobile_app_iphone","floorId":[],"areaId":[],"deviceId":[],"entityId":[],"labelId":[],"data":"{\t    \"message\": \"Garage Door was opened\",\t    \"title\": \"Garage Door opened!\"\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"notify","service":"mobile_app_iphone","x":460,"y":280,"wires":[[]]},{"id":"49b5425d.9340cc","type":"server","name":"Home Assistant","addon":true}]

Close Alert

[{"id":"49a462f55b519a2c","type":"server-state-changed","z":"fc01db6cebc7488d","name":"Door closed","server":"49b5425d.9340cc","version":6,"outputs":2,"exposeAsEntityConfig":"","entities":{"entity":["cover.pandagarage_0904_door"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"closed","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[],"x":190,"y":340,"wires":[["26d38b4f408344f5"],[]]},{"id":"26d38b4f408344f5","type":"api-call-service","z":"fc01db6cebc7488d","name":"","server":"49b5425d.9340cc","version":7,"debugenabled":false,"action":"notify.mobile_app_iphone","floorId":[],"areaId":[],"deviceId":[],"entityId":[],"labelId":[],"data":"{\t    \"message\": \"Garage Door was closed\",\t    \"title\": \"Garage Door Closed!\"\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"notify","service":"mobile_app_iphone","x":460,"y":340,"wires":[[]]},{"id":"49b5425d.9340cc","type":"server","name":"Home Assistant","addon":true}]

Receive an overtime alert when the door remains open for a specified duration

This sample automation creates a critical notification, when the door is open for 15 minutes.

[{"id":"a10f574a90597d7b","type":"server-state-changed","z":"fc01db6cebc7488d","name":"Door opened","server":"49b5425d.9340cc","version":6,"outputs":2,"exposeAsEntityConfig":"","entities":{"entity":["cover.pandagarage_0904_door"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"open","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"15","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[],"x":190,"y":180,"wires":[["47b7d06c743becd5"],[]]},{"id":"47b7d06c743becd5","type":"api-call-service","z":"fc01db6cebc7488d","name":"","server":"49b5425d.9340cc","version":7,"debugenabled":false,"action":"notify.mobile_app_iphone","floorId":[],"areaId":[],"deviceId":[],"entityId":[],"labelId":[],"data":"{\t    \"message\": \"Garage Door is open for 15 minutes\",\t    \"title\": \"Garage Door Overtime Alert!\",\t    \"data\": {\t       \"push\": {\t           \"interruption-level\": \"critical\"\t       }\t   }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"notify","service":"mobile_app_iphone","x":460,"y":180,"wires":[[]]},{"id":"49b5425d.9340cc","type":"server","name":"Home Assistant","addon":true}]

Restart PandaGarage if connection is lost

This automation will restart the PandaGarage, if the connection to Home Assistant is lost for 30 seconds. If after 10 minutes there is still no connection, it will send a critical notification to a selected phone.

[{"id":"628494410d54bdb5","type":"server-state-changed","z":"fc01db6cebc7488d","name":"Garage Door unavailabel for 30 seconds","server":"49b5425d.9340cc","version":6,"outputs":2,"exposeAsEntityConfig":"","entities":{"entity":["cover.pandagarage_0904_door"],"substring":[],"regex":[]},"outputInitially":false,"stateType":"str","ifState":"unavailable","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"1","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[],"x":280,"y":660,"wires":[["a31bae99d014f988"],[]]},{"id":"a31bae99d014f988","type":"api-call-service","z":"fc01db6cebc7488d","name":"Restart PandaGarage","server":"49b5425d.9340cc","version":7,"debugenabled":false,"action":"button.press","floorId":[],"areaId":[],"deviceId":[],"entityId":["button.pandagarage_0904_restart"],"labelId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":true,"domain":"button","service":"press","x":580,"y":660,"wires":[["0656de0a110f9b57"]]},{"id":"0656de0a110f9b57","type":"api-current-state","z":"fc01db6cebc7488d","name":"still unavailable?","server":"49b5425d.9340cc","version":3,"outputs":2,"halt_if":"unavailable","halt_if_type":"str","halt_if_compare":"is","entity_id":"cover.pandagarage_0904_door","state_type":"str","blockInputOverrides":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"10","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":800,"y":660,"wires":[["8ae9be2482d735f9"],[]]},{"id":"8ae9be2482d735f9","type":"api-call-service","z":"fc01db6cebc7488d","name":"Push Notification","server":"49b5425d.9340cc","version":7,"debugenabled":false,"action":"notify.mobile_app_iphone","floorId":[],"areaId":[],"deviceId":[],"entityId":[],"labelId":[],"data":"{\t    \"message\": \"Garage Door is offline for 10 minutes\",\t    \"title\": \"Garage Door Offline!\",\t    \"data\": {\t       \"push\": {\t           \"interruption-level\": \"critical\"\t       }\t   }\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","blockInputOverrides":false,"domain":"notify","service":"mobile_app_iphone","x":1010,"y":660,"wires":[[]]},{"id":"49b5425d.9340cc","type":"server","name":"Home Assistant","addon":true}]