Advertisement
Guest User

Untitled

a guest
Jun 20th, 2020
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.18 KB | None | 0 0
  1. [
  2. {
  3. "id": "8abc998c.295aa8",
  4. "type": "comment",
  5. "z": "65afea36.f08f24",
  6. "name": "Turn Washroom light on, if left on by mistake",
  7. "info": "",
  8. "x": 190,
  9. "y": 160,
  10. "wires": []
  11. },
  12. {
  13. "id": "bb68d525.4fedc8",
  14. "type": "server-state-changed",
  15. "z": "65afea36.f08f24",
  16. "name": "Washroom lights on",
  17. "server": "7dbc1ed6.c0f6e",
  18. "version": 1,
  19. "exposeToHomeAssistant": false,
  20. "haConfig": [
  21. {
  22. "property": "name",
  23. "value": ""
  24. },
  25. {
  26. "property": "icon",
  27. "value": ""
  28. }
  29. ],
  30. "entityidfilter": "switch.washroom_light",
  31. "entityidfiltertype": "exact",
  32. "outputinitially": false,
  33. "state_type": "str",
  34. "haltifstate": "on",
  35. "halt_if_type": "str",
  36. "halt_if_compare": "is",
  37. "outputs": 2,
  38. "output_only_on_state_change": true,
  39. "x": 130,
  40. "y": 440,
  41. "wires": [
  42. [
  43. "659a74a9.36a70c",
  44. "63018526.00bb0c",
  45. "3b3ff421.9c37ec",
  46. "bd7a3908.e83538"
  47. ],
  48. [
  49. "36166ec5.ef0c32"
  50. ]
  51. ]
  52. },
  53. {
  54. "id": "659a74a9.36a70c",
  55. "type": "api-current-state",
  56. "z": "65afea36.f08f24",
  57. "name": "Door closed?",
  58. "server": "7dbc1ed6.c0f6e",
  59. "version": 1,
  60. "outputs": 2,
  61. "halt_if": "off",
  62. "halt_if_type": "str",
  63. "halt_if_compare": "is",
  64. "override_topic": false,
  65. "entity_id": "binary_sensor.washroom_door",
  66. "state_type": "str",
  67. "state_location": "payload",
  68. "override_payload": "msg",
  69. "entity_location": "data",
  70. "override_data": "msg",
  71. "blockInputOverrides": false,
  72. "x": 370,
  73. "y": 440,
  74. "wires": [
  75. [
  76. "52a0f75f.cbfa98"
  77. ],
  78. []
  79. ]
  80. },
  81. {
  82. "id": "98b5b08c.f6471",
  83. "type": "ha-wait-until",
  84. "z": "65afea36.f08f24",
  85. "name": "Wait until door is opened",
  86. "server": "7dbc1ed6.c0f6e",
  87. "outputs": 1,
  88. "entityId": "binary_sensor.washroom_door",
  89. "entityIdFilterType": "exact",
  90. "property": "state",
  91. "comparator": "is",
  92. "value": "on",
  93. "valueType": "str",
  94. "timeout": 0,
  95. "timeoutType": "num",
  96. "timeoutUnits": "seconds",
  97. "entityLocation": "",
  98. "entityLocationType": "none",
  99. "checkCurrentState": true,
  100. "blockInputOverrides": true,
  101. "x": 570,
  102. "y": 340,
  103. "wires": [
  104. [
  105. "2e7c89f9.b5b396"
  106. ]
  107. ]
  108. },
  109. {
  110. "id": "52a0f75f.cbfa98",
  111. "type": "ha-wait-until",
  112. "z": "65afea36.f08f24",
  113. "name": "Wait until door closed",
  114. "server": "7dbc1ed6.c0f6e",
  115. "outputs": 1,
  116. "entityId": "binary_sensor.washroom_door",
  117. "entityIdFilterType": "exact",
  118. "property": "state",
  119. "comparator": "is",
  120. "value": "off",
  121. "valueType": "str",
  122. "timeout": "0",
  123. "timeoutType": "num",
  124. "timeoutUnits": "minutes",
  125. "entityLocation": "",
  126. "entityLocationType": "none",
  127. "checkCurrentState": true,
  128. "blockInputOverrides": true,
  129. "x": 560,
  130. "y": 420,
  131. "wires": [
  132. [
  133. "98b5b08c.f6471"
  134. ]
  135. ]
  136. },
  137. {
  138. "id": "b9e5fce8.27d65",
  139. "type": "api-call-service",
  140. "z": "65afea36.f08f24",
  141. "name": "Washroom light off",
  142. "server": "7dbc1ed6.c0f6e",
  143. "version": 1,
  144. "debugenabled": false,
  145. "service_domain": "switch",
  146. "service": "turn_off",
  147. "entityId": "switch.washroom_light",
  148. "data": "",
  149. "dataType": "json",
  150. "mergecontext": "",
  151. "output_location": "",
  152. "output_location_type": "none",
  153. "mustacheAltTags": false,
  154. "x": 850,
  155. "y": 420,
  156. "wires": [
  157. []
  158. ]
  159. },
  160. {
  161. "id": "4855df46.d8ed",
  162. "type": "stoptimer",
  163. "z": "65afea36.f08f24",
  164. "duration": "30",
  165. "units": "Second",
  166. "payloadtype": "num",
  167. "payloadval": "0",
  168. "name": "",
  169. "x": 850,
  170. "y": 340,
  171. "wires": [
  172. [
  173. "b9e5fce8.27d65"
  174. ],
  175. []
  176. ]
  177. },
  178. {
  179. "id": "63018526.00bb0c",
  180. "type": "stoptimer",
  181. "z": "65afea36.f08f24",
  182. "duration": "1",
  183. "units": "Minute",
  184. "payloadtype": "num",
  185. "payloadval": "0",
  186. "name": "",
  187. "x": 380,
  188. "y": 660,
  189. "wires": [
  190. [
  191. "b9e5fce8.27d65"
  192. ],
  193. []
  194. ]
  195. },
  196. {
  197. "id": "3b3ff421.9c37ec",
  198. "type": "trigger-state",
  199. "z": "65afea36.f08f24",
  200. "name": "Door opened?",
  201. "server": "7dbc1ed6.c0f6e",
  202. "exposeToHomeAssistant": false,
  203. "haConfig": [
  204. {
  205. "property": "name",
  206. "value": ""
  207. },
  208. {
  209. "property": "icon",
  210. "value": ""
  211. }
  212. ],
  213. "entityid": "binary_sensor.washroom_door",
  214. "entityidfiltertype": "exact",
  215. "debugenabled": false,
  216. "constraints": [
  217. {
  218. "id": "43mgpwhaswd",
  219. "targetType": "this_entity",
  220. "targetValue": "",
  221. "propertyType": "previous_state",
  222. "propertyValue": "old_state.state",
  223. "comparatorType": "is",
  224. "comparatorValueDatatype": "str",
  225. "comparatorValue": "off"
  226. }
  227. ],
  228. "constraintsmustmatch": "all",
  229. "outputs": 2,
  230. "customoutputs": [],
  231. "outputinitially": false,
  232. "state_type": "str",
  233. "x": 380,
  234. "y": 520,
  235. "wires": [
  236. [
  237. "c55a833b.0461d"
  238. ],
  239. []
  240. ]
  241. },
  242. {
  243. "id": "c55a833b.0461d",
  244. "type": "change",
  245. "z": "65afea36.f08f24",
  246. "name": "Stop timer",
  247. "rules": [
  248. {
  249. "t": "delete",
  250. "p": "payload",
  251. "pt": "msg"
  252. },
  253. {
  254. "t": "set",
  255. "p": "payload",
  256. "pt": "msg",
  257. "to": "STOP",
  258. "tot": "str"
  259. }
  260. ],
  261. "action": "",
  262. "property": "",
  263. "from": "",
  264. "to": "",
  265. "reg": false,
  266. "x": 370,
  267. "y": 600,
  268. "wires": [
  269. [
  270. "63018526.00bb0c"
  271. ]
  272. ]
  273. },
  274. {
  275. "id": "17547bd3.4b9314",
  276. "type": "ha-wait-until",
  277. "z": "65afea36.f08f24",
  278. "name": "Wait until door is opened",
  279. "server": "7dbc1ed6.c0f6e",
  280. "outputs": 1,
  281. "entityId": "binary_sensor.washroom_door",
  282. "entityIdFilterType": "exact",
  283. "property": "state",
  284. "comparator": "is",
  285. "value": "on",
  286. "valueType": "str",
  287. "timeout": 0,
  288. "timeoutType": "num",
  289. "timeoutUnits": "seconds",
  290. "entityLocation": "",
  291. "entityLocationType": "none",
  292. "checkCurrentState": true,
  293. "blockInputOverrides": true,
  294. "x": 570,
  295. "y": 180,
  296. "wires": [
  297. [
  298. "4855df46.d8ed"
  299. ]
  300. ]
  301. },
  302. {
  303. "id": "2e7c89f9.b5b396",
  304. "type": "ha-wait-until",
  305. "z": "65afea36.f08f24",
  306. "name": "Wait until door closed",
  307. "server": "7dbc1ed6.c0f6e",
  308. "outputs": 1,
  309. "entityId": "binary_sensor.washroom_door",
  310. "entityIdFilterType": "exact",
  311. "property": "state",
  312. "comparator": "is",
  313. "value": "off",
  314. "valueType": "str",
  315. "timeout": "0",
  316. "timeoutType": "num",
  317. "timeoutUnits": "minutes",
  318. "entityLocation": "",
  319. "entityLocationType": "none",
  320. "checkCurrentState": true,
  321. "blockInputOverrides": true,
  322. "x": 560,
  323. "y": 260,
  324. "wires": [
  325. [
  326. "17547bd3.4b9314"
  327. ]
  328. ]
  329. },
  330. {
  331. "id": "bd7a3908.e83538",
  332. "type": "trigger-state",
  333. "z": "65afea36.f08f24",
  334. "name": "Door closed?",
  335. "server": "7dbc1ed6.c0f6e",
  336. "exposeToHomeAssistant": false,
  337. "haConfig": [
  338. {
  339. "property": "name",
  340. "value": ""
  341. },
  342. {
  343. "property": "icon",
  344. "value": ""
  345. }
  346. ],
  347. "entityid": "binary_sensor.washroom_door",
  348. "entityidfiltertype": "exact",
  349. "debugenabled": false,
  350. "constraints": [
  351. {
  352. "id": "vqg9unzjasd",
  353. "targetType": "this_entity",
  354. "targetValue": "",
  355. "propertyType": "previous_state",
  356. "propertyValue": "old_state.state",
  357. "comparatorType": "is",
  358. "comparatorValueDatatype": "str",
  359. "comparatorValue": "on"
  360. }
  361. ],
  362. "constraintsmustmatch": "all",
  363. "outputs": 2,
  364. "customoutputs": [],
  365. "outputinitially": false,
  366. "state_type": "str",
  367. "x": 110,
  368. "y": 520,
  369. "wires": [
  370. [
  371. "f64666ca.8af8b8"
  372. ],
  373. []
  374. ]
  375. },
  376. {
  377. "id": "f64666ca.8af8b8",
  378. "type": "change",
  379. "z": "65afea36.f08f24",
  380. "name": "Stop timer",
  381. "rules": [
  382. {
  383. "t": "delete",
  384. "p": "payload",
  385. "pt": "msg"
  386. },
  387. {
  388. "t": "set",
  389. "p": "payload",
  390. "pt": "msg",
  391. "to": "STOP",
  392. "tot": "str"
  393. }
  394. ],
  395. "action": "",
  396. "property": "",
  397. "from": "",
  398. "to": "",
  399. "reg": false,
  400. "x": 110,
  401. "y": 600,
  402. "wires": [
  403. [
  404. "63018526.00bb0c",
  405. "33c3a6f2.cbf57a"
  406. ]
  407. ]
  408. },
  409. {
  410. "id": "33c3a6f2.cbf57a",
  411. "type": "change",
  412. "z": "65afea36.f08f24",
  413. "name": "Restart flow",
  414. "rules": [
  415. {
  416. "t": "delete",
  417. "p": "payload",
  418. "pt": "msg"
  419. },
  420. {
  421. "t": "set",
  422. "p": "payload",
  423. "pt": "msg",
  424. "to": "off",
  425. "tot": "str"
  426. }
  427. ],
  428. "action": "",
  429. "property": "",
  430. "from": "",
  431. "to": "",
  432. "reg": false,
  433. "x": 110,
  434. "y": 660,
  435. "wires": [
  436. [
  437. "2e7c89f9.b5b396"
  438. ]
  439. ]
  440. },
  441. {
  442. "id": "36166ec5.ef0c32",
  443. "type": "change",
  444. "z": "65afea36.f08f24",
  445. "name": "Stop timer",
  446. "rules": [
  447. {
  448. "t": "delete",
  449. "p": "payload",
  450. "pt": "msg"
  451. },
  452. {
  453. "t": "set",
  454. "p": "payload",
  455. "pt": "msg",
  456. "to": "STOP",
  457. "tot": "str"
  458. }
  459. ],
  460. "action": "",
  461. "property": "",
  462. "from": "",
  463. "to": "",
  464. "reg": false,
  465. "x": 110,
  466. "y": 380,
  467. "wires": [
  468. [
  469. "4855df46.d8ed"
  470. ]
  471. ]
  472. },
  473. {
  474. "id": "7dbc1ed6.c0f6e",
  475. "type": "server",
  476. "z": "",
  477. "name": "Home Assistant",
  478. "addon": true
  479. }
  480. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement