Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "id": "65b4280152d21b71",
- "type": "tab",
- "label": "Below zero Example",
- "disabled": false,
- "info": "## **Flow for night temperatures below zero**\n**By Anders Lukic**\n\n---\n<br>\n\n---\n\n### **Purpose and functionality**\n\n---\n\n\nThis flow include automations that:\n\n - Sends an actionable notification if outside temperature has been below zero during night\n - Ability to start car defrost or send reminder later\n \n---\n### **Requirements**\n---\nThis flow requires the following additional configuration to work:\n\n* input_boolean to toogle state when outside temperature is below zero during night"
- },
- {
- "id": "6fb64678b8daaadf",
- "type": "server-state-changed",
- "z": "65b4280152d21b71",
- "name": "Temp. below zero?",
- "server": "3bebce79.1e0962",
- "version": 1,
- "exposeToHomeAssistant": false,
- "haConfig": [
- {
- "property": "name",
- "value": ""
- },
- {
- "property": "icon",
- "value": ""
- }
- ],
- "entityidfilter": "sensor.netatmo_weather_home_ude_temperature",
- "entityidfiltertype": "exact",
- "outputinitially": false,
- "state_type": "str",
- "haltifstate": "0",
- "halt_if_type": "num",
- "halt_if_compare": "lt",
- "outputs": 2,
- "output_only_on_state_change": true,
- "for": "60",
- "forType": "num",
- "forUnits": "minutes",
- "ignorePrevStateNull": false,
- "ignorePrevStateUnknown": false,
- "ignorePrevStateUnavailable": false,
- "ignoreCurrentStateUnknown": false,
- "ignoreCurrentStateUnavailable": false,
- "x": 120,
- "y": 70,
- "wires": [
- [
- "75365d115fdf937f"
- ],
- []
- ]
- },
- {
- "id": "6dd6c29e5dbcc315",
- "type": "api-call-service",
- "z": "65b4280152d21b71",
- "name": "Turn on boolean",
- "server": "3bebce79.1e0962",
- "version": 1,
- "debugenabled": false,
- "service_domain": "input_boolean",
- "service": "turn_on",
- "entityId": "input_boolean.below_zero_at_night",
- "data": "",
- "dataType": "json",
- "mergecontext": "",
- "output_location": "",
- "output_location_type": "none",
- "mustacheAltTags": false,
- "x": 630,
- "y": 70,
- "wires": [
- []
- ]
- },
- {
- "id": "75365d115fdf937f",
- "type": "time-range-switch",
- "z": "65b4280152d21b71",
- "name": "Night?",
- "lat": "",
- "lon": "",
- "startTime": "22:00",
- "endTime": "22:00",
- "startOffset": 0,
- "endOffset": "08:00",
- "x": 330,
- "y": 70,
- "wires": [
- [
- "6dd6c29e5dbcc315"
- ],
- []
- ]
- },
- {
- "id": "629a90632325d690",
- "type": "inject",
- "z": "65b4280152d21b71",
- "name": "Weekdays at 7.00",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "00 07 * * 1,2,3,4,5",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payloadType": "date",
- "x": 120,
- "y": 190,
- "wires": [
- [
- "d3506e778fa2c5dd"
- ]
- ]
- },
- {
- "id": "0ed6e7f5240ab037",
- "type": "inject",
- "z": "65b4280152d21b71",
- "name": "Weekends at 9.00",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "00 09 * * 6,0",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payloadType": "date",
- "x": 120,
- "y": 240,
- "wires": [
- [
- "d3506e778fa2c5dd"
- ]
- ]
- },
- {
- "id": "d3506e778fa2c5dd",
- "type": "api-current-state",
- "z": "65b4280152d21b71",
- "name": "Below zero during night?",
- "server": "3bebce79.1e0962",
- "version": 1,
- "outputs": 2,
- "halt_if": "on",
- "halt_if_type": "str",
- "halt_if_compare": "is",
- "override_topic": false,
- "entity_id": "input_boolean.below_zero_at_night",
- "state_type": "str",
- "state_location": "payload",
- "override_payload": "msg",
- "entity_location": "data",
- "override_data": "msg",
- "blockInputOverrides": false,
- "x": 390,
- "y": 220,
- "wires": [
- [
- "d10efe29357ba15d",
- "4c32ca0623407f77"
- ],
- []
- ]
- },
- {
- "id": "d10efe29357ba15d",
- "type": "api-call-service",
- "z": "65b4280152d21b71",
- "name": "Turn off boolean",
- "server": "3bebce79.1e0962",
- "version": 1,
- "debugenabled": false,
- "service_domain": "input_boolean",
- "service": "turn_off",
- "entityId": "input_boolean.below_zero_at_night",
- "data": "",
- "dataType": "json",
- "mergecontext": "",
- "output_location": "",
- "output_location_type": "none",
- "mustacheAltTags": false,
- "x": 630,
- "y": 180,
- "wires": [
- []
- ]
- },
- {
- "id": "470c242a24f346f1",
- "type": "api-call-service",
- "z": "65b4280152d21b71",
- "name": "Notification - temp < 0",
- "server": "3bebce79.1e0962",
- "version": 1,
- "debugenabled": false,
- "service_domain": "notify",
- "service": "mobile_app_my_iphone",
- "entityId": "",
- "data": "{\"message\":\"Det har været frostvejr i nat. Er der frost på bilen?\",\"title\":\"Advarsel om nattefrost\",\"data\":{\"actions\":[{\"action\":\"START_DEFROST\",\"title\":\"Ja - start opvarmning af bil\"},{\"action\":\"REMIND_LATER_DEFROST\",\"title\":\"Spørg mig igen senere\"}],\"attachment\":{\"content-type\":\"jpeg\",\"image\":\"https://[HA_URL]/local/snapshots/carport_2.jpg\",\"url\":\"https://[HA_URL]/local/snapshots/carport_2.jpg\"}}}",
- "dataType": "json",
- "mergecontext": "",
- "output_location": "",
- "output_location_type": "none",
- "mustacheAltTags": false,
- "x": 910,
- "y": 250,
- "wires": [
- []
- ]
- },
- {
- "id": "4c32ca0623407f77",
- "type": "api-call-service",
- "z": "65b4280152d21b71",
- "name": "Snapshot - lastest",
- "server": "3bebce79.1e0962",
- "version": 1,
- "debugenabled": false,
- "service_domain": "camera",
- "service": "snapshot",
- "entityId": "camera.carport_2",
- "data": "{\"filename\":\"/config/www/snapshots/carport_2.jpg\"}",
- "dataType": "json",
- "mergecontext": "",
- "output_location": "",
- "output_location_type": "none",
- "mustacheAltTags": false,
- "x": 640,
- "y": 250,
- "wires": [
- [
- "470c242a24f346f1"
- ]
- ]
- },
- {
- "id": "47c9eae3ee55c00b",
- "type": "comment",
- "z": "65b4280152d21b71",
- "name": "Set input_boolean when outside temperature is below zero during night",
- "info": "",
- "x": 280,
- "y": 30,
- "wires": []
- },
- {
- "id": "472d20ce71d3919d",
- "type": "comment",
- "z": "65b4280152d21b71",
- "name": "Send actionable notification in the morning - if outside temperature has been below zero during night",
- "info": "",
- "x": 370,
- "y": 130,
- "wires": []
- },
- {
- "id": "2fab09c241c3180a",
- "type": "comment",
- "z": "65b4280152d21b71",
- "name": "Respond to actions",
- "info": "",
- "x": 120,
- "y": 310,
- "wires": []
- },
- {
- "id": "a273fc93b505fdb3",
- "type": "server-events",
- "z": "65b4280152d21b71",
- "name": "IOS Action?",
- "server": "3bebce79.1e0962",
- "event_type": "mobile_app_notification_action",
- "exposeToHomeAssistant": false,
- "haConfig": [
- {
- "property": "name",
- "value": ""
- },
- {
- "property": "icon",
- "value": ""
- }
- ],
- "waitForRunning": true,
- "x": 100,
- "y": 370,
- "wires": [
- [
- "5e51010d203fc53b"
- ]
- ]
- },
- {
- "id": "5e51010d203fc53b",
- "type": "switch",
- "z": "65b4280152d21b71",
- "name": "Resonse to alert?",
- "property": "payload.event.action",
- "propertyType": "msg",
- "rules": [
- {
- "t": "eq",
- "v": "REMIND_LATER_DEFROST",
- "vt": "str"
- },
- {
- "t": "eq",
- "v": "START_DEFROST",
- "vt": "str"
- }
- ],
- "checkall": "false",
- "repair": false,
- "outputs": 2,
- "x": 370,
- "y": 370,
- "wires": [
- [
- "c0c369da35e47c4e"
- ],
- [
- "fdc4db3e914245f3"
- ]
- ],
- "outputLabels": [
- "Postpone cleaning",
- "Remind me later"
- ]
- },
- {
- "id": "fdc4db3e914245f3",
- "type": "debug",
- "z": "65b4280152d21b71",
- "name": "Start defrost",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "payload",
- "targetType": "msg",
- "statusVal": "",
- "statusType": "auto",
- "x": 610,
- "y": 400,
- "wires": []
- },
- {
- "id": "c0c369da35e47c4e",
- "type": "delay",
- "z": "65b4280152d21b71",
- "name": "Ask again in 15 mins.",
- "pauseType": "delay",
- "timeout": "15",
- "timeoutUnits": "minutes",
- "rate": "1",
- "nbRateUnits": "1",
- "rateUnits": "second",
- "randomFirst": "1",
- "randomLast": "5",
- "randomUnits": "seconds",
- "drop": false,
- "x": 640,
- "y": 340,
- "wires": [
- [
- "470c242a24f346f1"
- ]
- ]
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement