- [
- {
- "id": "a9f6b40e.dca838",
- "type": "function",
- "z": "5826043d.edb7fc",
- "name": "Increment dim",
- "func": "brightness = (context.get(\"brightness\") || 255);\nif(brightness >= 5){\nbrightness = brightness - 1;\nmsg.brightness = Math.min(255, brightness);\nnode.status({text: msg.brightness});\ncontext.set(\"brightness\", brightness);\nreturn msg;\n}",
- "outputs": 1,
- "noerr": 0,
- "x": 560,
- "y": 40,
- "wires": [
- [
- "79a67cde.e44624",
- "ed364336.13b81",
- "fdb5350c.8a43a8"
- ]
- ]
- },
- {
- "id": "79a67cde.e44624",
- "type": "debug",
- "z": "5826043d.edb7fc",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "brightness",
- "targetType": "msg",
- "x": 860,
- "y": 400,
- "wires": []
- },
- {
- "id": "25532fea.e1cae",
- "type": "delay",
- "z": "5826043d.edb7fc",
- "name": "delay",
- "pauseType": "delayv",
- "timeout": "5",
- "timeoutUnits": "seconds",
- "rate": "1",
- "nbRateUnits": "2",
- "rateUnits": "second",
- "randomFirst": "1",
- "randomLast": "5",
- "randomUnits": "seconds",
- "drop": true,
- "x": 1250,
- "y": 520,
- "wires": [
- []
- ]
- },
- {
- "id": "580eb00a.9f8be",
- "type": "change",
- "z": "5826043d.edb7fc",
- "name": "reset",
- "rules": [
- {
- "t": "set",
- "p": "reset",
- "pt": "msg",
- "to": "true",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 250,
- "y": 520,
- "wires": [
- [
- "25532fea.e1cae"
- ]
- ]
- },
- {
- "id": "9572e3d0.c9123",
- "type": "inject",
- "z": "5826043d.edb7fc",
- "name": "STOP",
- "topic": "",
- "payload": "",
- "payloadType": "date",
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "x": 90,
- "y": 340,
- "wires": [
- [
- "580eb00a.9f8be",
- "8367aed5.f4fca",
- "a9f6b40e.dca838",
- "682540f3.1c44a"
- ]
- ]
- },
- {
- "id": "ee73b646.309248",
- "type": "looptimer",
- "z": "5826043d.edb7fc",
- "duration": "1.75",
- "units": "Minute",
- "maxloops": "255",
- "maxtimeout": "7",
- "maxtimeoutunits": "Hour",
- "name": "2min 255x 6.33 Hours",
- "x": 300,
- "y": 40,
- "wires": [
- [
- "a9f6b40e.dca838",
- "8367aed5.f4fca",
- "682540f3.1c44a"
- ],
- []
- ]
- },
- {
- "id": "633d9431.16ba9c",
- "type": "api-call-service",
- "z": "5826043d.edb7fc",
- "name": "Living Room | Overhead",
- "server": "2451a35b.d6669c",
- "service_domain": "homeassistant",
- "service": "turn_on",
- "data": "{\"entity_id\":\"light.caseta_r_wireless_in_wall_dimmer\",\"brightness\":\"{{brightness}}\"}",
- "mergecontext": "",
- "output_location": "",
- "output_location_type": "none",
- "mustacheAltTags": false,
- "x": 970,
- "y": 480,
- "wires": [
- [
- "25532fea.e1cae"
- ]
- ]
- },
- {
- "id": "150b9b31.76f455",
- "type": "api-call-service",
- "z": "5826043d.edb7fc",
- "name": "Foyer | Overhead",
- "server": "2451a35b.d6669c",
- "service_domain": "homeassistant",
- "service": "turn_on",
- "data": "{\"entity_id\":\"light.caseta_r_wireless_in_wall_dimmer_2\",\"brightness\":\"{{brightness}}\"}",
- "mergecontext": "",
- "output_location": "",
- "output_location_type": "none",
- "mustacheAltTags": false,
- "x": 970,
- "y": 80,
- "wires": [
- [
- "25532fea.e1cae"
- ]
- ]
- },
- {
- "id": "ed364336.13b81",
- "type": "api-call-service",
- "z": "5826043d.edb7fc",
- "name": "Dining Room | Overhead",
- "server": "2451a35b.d6669c",
- "service_domain": "homeassistant",
- "service": "turn_on",
- "data": "{\"entity_id\":\"light.caseta_r_wireless_in_wall_dimmer_4\",\"brightness\":\"{{brightness}}\"}",
- "mergecontext": "",
- "output_location": "",
- "output_location_type": "none",
- "mustacheAltTags": false,
- "x": 950,
- "y": 120,
- "wires": [
- [
- "25532fea.e1cae"
- ]
- ]
- },
- {
- "id": "d098ec51.79f7f",
- "type": "api-call-service",
- "z": "5826043d.edb7fc",
- "name": "Hallway | Overhead",
- "server": "2451a35b.d6669c",
- "service_domain": "homeassistant",
- "service": "turn_on",
- "data": "{\"entity_id\":\"light.caseta_r_wireless_in_wall_dimmer_5\",\"brightness\":\"{{brightness}}\"}",
- "mergecontext": "",
- "output_location": "",
- "output_location_type": "none",
- "mustacheAltTags": false,
- "x": 950,
- "y": 260,
- "wires": [
- [
- "25532fea.e1cae"
- ]
- ]
- },
- {
- "id": "114ab25a.b6bcfe",
- "type": "api-call-service",
- "z": "5826043d.edb7fc",
- "name": "Bathroom | Overhead",
- "server": "2451a35b.d6669c",
- "service_domain": "homeassistant",
- "service": "turn_on",
- "data": "{\"entity_id\":\"light.caseta_r_wireless_in_wall_dimmer_6\",\"brightness\":\"{{brightness}}\"}",
- "mergecontext": "",
- "output_location": "",
- "output_location_type": "none",
- "mustacheAltTags": false,
- "x": 960,
- "y": 220,
- "wires": [
- [
- "25532fea.e1cae"
- ]
- ]
- },
- {
- "id": "f8915a72.8e37c8",
- "type": "inject",
- "z": "5826043d.edb7fc",
- "name": "3.29pm",
- "topic": "",
- "payload": "",
- "payloadType": "date",
- "repeat": "",
- "crontab": "45 15 * * *",
- "once": false,
- "onceDelay": 0.1,
- "x": 100,
- "y": 40,
- "wires": [
- [
- "ee73b646.309248"
- ]
- ]
- },
- {
- "id": "8367aed5.f4fca",
- "type": "function",
- "z": "5826043d.edb7fc",
- "name": "Increment dim",
- "func": "brightness = (context.get(\"brightness\") || 255);\nif(brightness >= 24){\nbrightness = brightness - 1;\nmsg.brightness = Math.min(255, brightness);\nnode.status({text: msg.brightness});\ncontext.set(\"brightness\", brightness);\nreturn msg;\n}",
- "outputs": 1,
- "noerr": 0,
- "x": 560,
- "y": 240,
- "wires": [
- [
- "d098ec51.79f7f",
- "79a67cde.e44624",
- "114ab25a.b6bcfe"
- ]
- ]
- },
- {
- "id": "fdb5350c.8a43a8",
- "type": "delay",
- "z": "5826043d.edb7fc",
- "name": "",
- "pauseType": "delay",
- "timeout": "1",
- "timeoutUnits": "seconds",
- "rate": "1",
- "nbRateUnits": "1",
- "rateUnits": "second",
- "randomFirst": "1",
- "randomLast": "5",
- "randomUnits": "seconds",
- "drop": false,
- "x": 740,
- "y": 40,
- "wires": [
- [
- "bf642f83.adb1e",
- "150b9b31.76f455"
- ]
- ]
- },
- {
- "id": "bf642f83.adb1e",
- "type": "api-call-service",
- "z": "5826043d.edb7fc",
- "name": "Kitchen | Overhead",
- "server": "2451a35b.d6669c",
- "service_domain": "homeassistant",
- "service": "turn_on",
- "data": "{\"entity_id\":\"light.caseta_r_wireless_in_wall_dimmer_7\",\"brightness\":\"{{brightness}}\"}",
- "mergecontext": "",
- "output_location": "",
- "output_location_type": "none",
- "mustacheAltTags": false,
- "x": 970,
- "y": 40,
- "wires": [
- [
- "25532fea.e1cae"
- ]
- ]
- },
- {
- "id": "682540f3.1c44a",
- "type": "function",
- "z": "5826043d.edb7fc",
- "name": "Increment dim",
- "func": "brightness = (context.get(\"brightness\") || 255);\nif(brightness >= 24){\nbrightness = brightness - 1;\nmsg.brightness = Math.min(255, brightness);\nnode.status({text: msg.brightness});\ncontext.set(\"brightness\", brightness);\nreturn msg;\n}",
- "outputs": 1,
- "noerr": 0,
- "x": 560,
- "y": 480,
- "wires": [
- [
- "633d9431.16ba9c"
- ]
- ]
- },
- {
- "id": "2451a35b.d6669c",
- "type": "server",
- "z": "",
- "name": "Home Assistant"
- }
- ]