-
Notifications
You must be signed in to change notification settings - Fork 0
/
Bath_PIR105.json
1 lines (1 loc) · 72.1 KB
/
Bath_PIR105.json
1
[{"id":"d9e1f7694e10602f","type":"tab","label":"Bath auto1","disabled":false,"info":""},{"id":"f3e2adba38ef4749","type":"trigger","z":"d9e1f7694e10602f","name":"","op1":"","op2":"false","op1type":"nul","op2type":"bool","duration":"12","extend":true,"overrideDelay":false,"units":"min","reset":"true","bytopic":"all","topic":"topic","outputs":1,"x":1030,"y":460,"wires":[["fbd164836daee3ae","bacdc90e137a9415"]],"info":"Shower minutes"},{"id":"61ee866f4dd0d368","type":"switch","z":"d9e1f7694e10602f","name":"on-off","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":345,"y":280,"wires":[["3c03017cac4980de","15b884160cfc7ce2"],["e7dcb727e3c633c2"]]},{"id":"96dd0bfd1acf0dab","type":"api-call-service","z":"d9e1f7694e10602f","name":"Humid high Blue LED on","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.bath_sense_blue"],"data":"{\"brightness_pct\":\"55\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2050,"y":1360,"wires":[["ab6c5d869c42f991","04bbb861f942cb2c"]],"info":"{\"transition\":\"0\", \"brightness_pct\":\"55\"}"},{"id":"3a72325e794f533f","type":"api-call-service","z":"d9e1f7694e10602f","name":"Humid Blue off","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.bath_sense_blue"],"data":"{\"transition\":\"0\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2060,"y":1460,"wires":[["896b32378842f73f"]]},{"id":"60168020cfeb90cc","type":"api-call-service","z":"d9e1f7694e10602f","name":"bath fan on","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.bath_fan_switch_2"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2110,"y":1120,"wires":[["64a7d189879a2a99"]]},{"id":"0a0bde4d579356c8","type":"api-call-service","z":"d9e1f7694e10602f","name":"bath fan off","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.bath_fan_switch_2"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2110,"y":1220,"wires":[["7e956b22d22dc9e6","33d8085e08834dd7"]]},{"id":"3c03017cac4980de","type":"api-call-service","z":"d9e1f7694e10602f","name":"grn LED on","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.bath_sense_green"],"data":"{\"transition\":\"0\", \"brightness_pct\":\"40\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2110,"y":580,"wires":[[]],"info":"{\"transition\":\"0\", \"brightness_pct\":\"40\"}"},{"id":"dbe045ea2aa39a16","type":"api-call-service","z":"d9e1f7694e10602f","name":"Red LED off","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.bath_sense_red"],"data":"{\"transition\":\"0\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2055,"y":1740,"wires":[["e0def9651a2df497"]]},{"id":"163163efe77f1602","type":"server-state-changed","z":"d9e1f7694e10602f","name":"bh","server":"ee6cbdefc4886d1a","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"sensor.bath_sense_humidity_2","entityIdType":"exact","outputInitially":false,"stateType":"num","ifState":"$entities(\"input_number.bath_humid_set\").state","ifStateType":"jsonata","ifStateOperator":"gte","outputOnlyOnStateChange":false,"for":"","forType":"num","forUnits":"seconds","ignorePrevStateNull":true,"ignorePrevStateUnknown":true,"ignorePrevStateUnavailable":true,"ignoreCurrentStateUnknown":true,"ignoreCurrentStateUnavailable":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"}],"x":65,"y":780,"wires":[["1843bd5acc6d8671","e04818d5d13221cd","9c974d0ce518527c"],["788d86942fe5af81","e70a0833585bd7f0","47f6a5353c957240"]]},{"id":"08fb8fa9a67bfbf3","type":"api-current-state","z":"d9e1f7694e10602f","name":"cooler off","server":"ee6cbdefc4886d1a","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.fan_power","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":440,"y":920,"wires":[["2612b4a5bcdb481d","008198fbb7756bed","a30dfe9af1f1fb62"],["84ad2b366f797c0c","6b95ab6dcfce6f1a"]]},{"id":"64a7d189879a2a99","type":"debug","z":"d9e1f7694e10602f","name":"fan on out","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":2100,"y":1180,"wires":[]},{"id":"7e956b22d22dc9e6","type":"debug","z":"d9e1f7694e10602f","name":"fan off","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":2090,"y":1280,"wires":[]},{"id":"bcacd0341f829fb7","type":"debug","z":"d9e1f7694e10602f","name":"15 triggered","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":2090,"y":700,"wires":[]},{"id":"fcceaca3952cff94","type":"inject","z":"d9e1f7694e10602f","name":"bath fan reset","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":410,"y":420,"wires":[["f21a445a739e12c4"]]},{"id":"a1d320fe7e761a7a","type":"inject","z":"d9e1f7694e10602f","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"on","payloadType":"str","x":105,"y":360,"wires":[["61ee866f4dd0d368"]]},{"id":"a5da4588511e9eb6","type":"inject","z":"d9e1f7694e10602f","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"off","payloadType":"str","x":105,"y":400,"wires":[["61ee866f4dd0d368"]]},{"id":"d6c10895eeac6207","type":"trigger","z":"d9e1f7694e10602f","name":"cool fan on","op1":"true","op2":"0","op1type":"bool","op2type":"str","duration":"0","extend":false,"overrideDelay":false,"units":"ms","reset":"true","bytopic":"all","topic":"topic","outputs":1,"x":930,"y":640,"wires":[["b9a1c4424710dbec","a9ed2dfea135d344","008198fbb7756bed"]]},{"id":"008198fbb7756bed","type":"trigger","z":"d9e1f7694e10602f","name":"cool fan off","op1":"true","op2":"0","op1type":"bool","op2type":"str","duration":"0","extend":false,"overrideDelay":false,"units":"ms","reset":"true","bytopic":"all","topic":"topic","outputs":1,"x":950,"y":700,"wires":[["d6c10895eeac6207","e6ef6658fdc319a9","11f90a6c3237e1ee"]]},{"id":"f1aa8972808bd628","type":"trigger","z":"d9e1f7694e10602f","name":"rain","op1":"true","op2":"0","op1type":"bool","op2type":"str","duration":"0","extend":false,"overrideDelay":false,"units":"ms","reset":"true","bytopic":"all","topic":"topic","outputs":1,"x":270,"y":1180,"wires":[["108102f5c6397f0a","f2cf0ac7da0cf779","7c227f78661bc28f"]]},{"id":"108102f5c6397f0a","type":"trigger","z":"d9e1f7694e10602f","name":"no rain","op1":"true","op2":"0","op1type":"bool","op2type":"str","duration":"0","extend":false,"overrideDelay":false,"units":"ms","reset":"true","bytopic":"all","topic":"topic","outputs":1,"x":300,"y":1220,"wires":[["f1aa8972808bd628","31ac458aeb96355d","c46ecc00c066109f"]]},{"id":"1843bd5acc6d8671","type":"trigger","z":"d9e1f7694e10602f","name":"humid over threshold","op1":"true","op2":"0","op1type":"bool","op2type":"str","duration":"0","extend":false,"overrideDelay":false,"units":"ms","reset":"true","bytopic":"all","topic":"topic","outputs":1,"x":995,"y":800,"wires":[["788d86942fe5af81","96dd0bfd1acf0dab"]]},{"id":"788d86942fe5af81","type":"trigger","z":"d9e1f7694e10602f","name":"humid under","op1":"true","op2":"0","op1type":"bool","op2type":"str","duration":"0","extend":false,"overrideDelay":false,"units":"ms","reset":"true","bytopic":"all","topic":"topic","outputs":1,"x":1005,"y":860,"wires":[["1843bd5acc6d8671","a30dfe9af1f1fb62","3a72325e794f533f"]]},{"id":"c2a83942c7824b9a","type":"api-current-state","z":"d9e1f7694e10602f","name":"cooler on","server":"ee6cbdefc4886d1a","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.fan_power","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":335,"y":660,"wires":[["ec55c48d88b9bd63","6b95ab6dcfce6f1a"],["c71f9e4409facf86","5a4b2ceedf647e2b"]],"info":"unavailable\nswitch.fan_power\nswitch.bath_fan_switch_2"},{"id":"33d8085e08834dd7","type":"change","z":"d9e1f7694e10602f","name":"reset toggles off","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1575,"y":940,"wires":[["1843bd5acc6d8671","788d86942fe5af81","6a485f567bca78bb","fac47c2086514ac6","3a72325e794f533f","11f90a6c3237e1ee","2128e240cd83d085","d6c10895eeac6207"]],"info":"Look for binary false make it true\nLook for string false make it true\nCan use msg: reset = timestamp\notherwize it true send out"},{"id":"9fd28a045606a13a","type":"inject","z":"d9e1f7694e10602f","name":"true-reset","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":540,"y":500,"wires":[["33d8085e08834dd7","bb122fbe1a0b1ed2","a34c270d521a6173","9c268412d205bc98"]]},{"id":"15b884160cfc7ce2","type":"api-current-state","z":"d9e1f7694e10602f","name":"R we showering-1","server":"ee6cbdefc4886d1a","version":3,"outputs":2,"halt_if":"$number($entities(\"input_number.bath_humid_set\").state) + $number($entities(\"input_number.shower_constant\").state)","halt_if_type":"jsonata","halt_if_compare":"gt","entity_id":"sensor.bath_sense_humidity_2","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"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":305,"y":160,"wires":[["c74649556590cf76","d72cb7f0892d9dea","fac47c2086514ac6"],["16320741f4bb88cb","c10a10dcdbd82cd8","bacdc90e137a9415"]],"info":"$number($entities(\"input_number.bath_humid_set\").state) + $number($entities(\"input_number.shower_constant\").state)\n"},{"id":"c74649556590cf76","type":"debug","z":"d9e1f7694e10602f","name":"hH","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":510,"y":120,"wires":[]},{"id":"16320741f4bb88cb","type":"debug","z":"d9e1f7694e10602f","name":"hL","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":510,"y":160,"wires":[]},{"id":"e04818d5d13221cd","type":"debug","z":"d9e1f7694e10602f","name":"humid","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":90,"y":720,"wires":[]},{"id":"e70a0833585bd7f0","type":"debug","z":"d9e1f7694e10602f","name":"not humid","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":95,"y":860,"wires":[]},{"id":"31ac458aeb96355d","type":"change","z":"d9e1f7694e10602f","name":"thunder over","rules":[{"t":"change","p":"payload","pt":"msg","from":"false","fromt":"str","to":"true","tot":"bool"},{"t":"set","p":"payload","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":560,"y":1440,"wires":[["c46ecc00c066109f"]]},{"id":"e5f18cc189404073","type":"trigger","z":"d9e1f7694e10602f","name":"thunder","op1":"true","op2":"0","op1type":"bool","op2type":"str","duration":"0","extend":false,"overrideDelay":false,"units":"ms","reset":"true","bytopic":"all","topic":"topic","outputs":1,"x":330,"y":1400,"wires":[["c24b1dbb648d2976","0b216ff8722e4f99","7917639be8d4711b"]]},{"id":"c24b1dbb648d2976","type":"trigger","z":"d9e1f7694e10602f","name":"no thunder","op1":"true","op2":"0","op1type":"bool","op2type":"str","duration":"0","extend":false,"overrideDelay":false,"units":"ms","reset":"true","bytopic":"all","topic":"topic","outputs":1,"x":360,"y":1440,"wires":[["e5f18cc189404073","31ac458aeb96355d","470513956b0a21ab"]]},{"id":"eddab6ed918ca99b","type":"debug","z":"d9e1f7694e10602f","name":"rain","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":430,"y":1160,"wires":[]},{"id":"470513956b0a21ab","type":"debug","z":"d9e1f7694e10602f","name":"no thunder","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":530,"y":1480,"wires":[]},{"id":"0b216ff8722e4f99","type":"debug","z":"d9e1f7694e10602f","name":"thunder","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":520,"y":1400,"wires":[]},{"id":"5088b4f39ed18e1a","type":"debug","z":"d9e1f7694e10602f","name":"no rain","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":390,"y":1260,"wires":[]},{"id":"0ddf7cfbe65baaf1","type":"inject","z":"d9e1f7694e10602f","name":"reset","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":70,"y":1360,"wires":[["f1aa8972808bd628","108102f5c6397f0a","e5f18cc189404073","c24b1dbb648d2976"]]},{"id":"f685f209e7902561","type":"inject","z":"d9e1f7694e10602f","name":"rain","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":70,"y":1100,"wires":[["f1aa8972808bd628"]]},{"id":"12fbf1894588efdb","type":"api-call-service","z":"d9e1f7694e10602f","name":"Red LED on","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.bath_sense_red"],"data":"{\"brightness_pct\":\"30\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2055,"y":1680,"wires":[["cd4dbdc50a16de1c","e287a65eabcd9508"]]},{"id":"6b14335f38b0435c","type":"inject","z":"d9e1f7694e10602f","name":"no rain","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":70,"y":1320,"wires":[["108102f5c6397f0a"]]},{"id":"94b9718ce9eafe63","type":"debug","z":"d9e1f7694e10602f","name":"light is off","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":2100,"y":820,"wires":[]},{"id":"2612b4a5bcdb481d","type":"debug","z":"d9e1f7694e10602f","name":"co true 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":475,"y":860,"wires":[]},{"id":"ec55c48d88b9bd63","type":"debug","z":"d9e1f7694e10602f","name":"co true 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":560,"y":600,"wires":[]},{"id":"c71f9e4409facf86","type":"debug","z":"d9e1f7694e10602f","name":"CO false 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":510,"y":660,"wires":[]},{"id":"84ad2b366f797c0c","type":"debug","z":"d9e1f7694e10602f","name":"CO false 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":510,"y":980,"wires":[]},{"id":"d99c6dbe3e863583","type":"inject","z":"d9e1f7694e10602f","name":"start blue blinking","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":635,"y":1140,"wires":[["de0ffdc582ebd7e6"]]},{"id":"fbd164836daee3ae","type":"debug","z":"d9e1f7694e10602f","name":"12 trig out","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1195,"y":560,"wires":[]},{"id":"5a4b2ceedf647e2b","type":"api-current-state","z":"d9e1f7694e10602f","name":"more humid than > oh1?","server":"ee6cbdefc4886d1a","version":3,"outputs":2,"halt_if":"$number($entities(\"sensor.oh1_humidity\").state)\t","halt_if_type":"jsonata","halt_if_compare":"gte","entity_id":"sensor.bath_sense_humidity_2","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"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":430,"y":740,"wires":[["6b95ab6dcfce6f1a"],["6a485f567bca78bb","8ce4c023df3b6d7a"]],"info":"sensor.bath_sense_humidity_2\n\n($entities('sensor.bath_sense_humidity_2').state > $entities('sensor.oh1_humidity').state)\n\nJson:\n$entities(\"sensor.oh1_humidity\").state"},{"id":"23803f25eeaeae19","type":"poll-state","z":"d9e1f7694e10602f","name":"Rain?","server":"ee6cbdefc4886d1a","version":3,"exposeAsEntityConfig":"","updateInterval":"60","updateIntervalType":"num","updateIntervalUnits":"seconds","outputInitially":true,"outputOnChanged":false,"entityId":"weather.openweathermap","stateType":"str","ifState":"($entities(\"weather.openweathermap\").state = \"pouring\" or $entities(\"weather.openweathermap\").state = \"rainy\" or $entities(\"binary_sensor.internet\").state = true )","ifStateType":"jsonata","ifStateOperator":"jsonata","outputs":2,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":50,"y":1140,"wires":[["f1aa8972808bd628","eddab6ed918ca99b"],["108102f5c6397f0a","5088b4f39ed18e1a"]]},{"id":"a6be554d88c1306b","type":"poll-state","z":"d9e1f7694e10602f","name":"Thunder & Rain?","server":"ee6cbdefc4886d1a","version":3,"exposeAsEntityConfig":"","updateInterval":"60","updateIntervalType":"num","updateIntervalUnits":"seconds","outputInitially":true,"outputOnChanged":false,"entityId":"weather.openweathermap","stateType":"str","ifState":"lightning","ifStateType":"str","ifStateOperator":"includes","outputs":2,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":80,"y":1400,"wires":[["e5f18cc189404073","6d6a25eb5097fa07"],["c24b1dbb648d2976","1db13e15445b8d1d"]]},{"id":"cf0e6a1c4f3af4fc","type":"inject","z":"d9e1f7694e10602f","name":"lightning","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"lightning","payloadType":"msg","x":80,"y":1580,"wires":[["e5f18cc189404073"]]},{"id":"6d6a25eb5097fa07","type":"debug","z":"d9e1f7694e10602f","name":"t2","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":330,"y":1500,"wires":[]},{"id":"1db13e15445b8d1d","type":"debug","z":"d9e1f7694e10602f","name":"t3","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":330,"y":1540,"wires":[]},{"id":"7917639be8d4711b","type":"change","z":"d9e1f7694e10602f","name":"yes thunder","rules":[{"t":"set","p":"payload","pt":"msg","to":"on","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":1340,"wires":[["c1b4019a6249afda","179dc34ec8127fbe"]]},{"id":"b484ca795a44bc4e","type":"change","z":"d9e1f7694e10602f","name":"true no shower","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1580,"y":580,"wires":[["73f32bc0f5d150af","b2a642731046ae02","90c0c85cdc11211f","9455e3e6562b2627","d0ab044e7422ec37"]],"info":"Can use msg: reset = timestamp"},{"id":"03d10539a3d9e7fb","type":"debug","z":"d9e1f7694e10602f","name":"humid and > ih1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1140,"y":960,"wires":[]},{"id":"5860a1f28176f19e","type":"debug","z":"d9e1f7694e10602f","name":"humid but < ih1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1140,"y":1060,"wires":[]},{"id":"a30dfe9af1f1fb62","type":"change","z":"d9e1f7694e10602f","name":"reset flashers off","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":615,"y":1060,"wires":[["3a72325e794f533f","6a485f567bca78bb","fac47c2086514ac6"]],"info":"Can use msg: reset = timestamp"},{"id":"11f90a6c3237e1ee","type":"trigger","z":"d9e1f7694e10602f","name":"failsafe off after 45 mins","op1":"","op2":"true","op1type":"nul","op2type":"bool","duration":"45","extend":false,"overrideDelay":true,"units":"min","reset":"true","bytopic":"all","topic":"topic","outputs":1,"x":1370,"y":720,"wires":[["dcbee3af7ba569f3","cf20a93dc6775019"]]},{"id":"b9a1c4424710dbec","type":"change","z":"d9e1f7694e10602f","name":"turn on 45 timer","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":1200,"y":640,"wires":[["11f90a6c3237e1ee","0066a249fe0bc5b3"]]},{"id":"73f32bc0f5d150af","type":"api-call-service","z":"d9e1f7694e10602f","name":"Bulb1BA-off","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":["70af5abd105cae66d797c5ae762ecc90"],"entityId":[],"data":"{\"transition\":\"5\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2090,"y":760,"wires":[["94b9718ce9eafe63","9c268412d205bc98","6fdf1d63b9800678","a5095d520c35f6a6","a34c270d521a6173"]]},{"id":"e1ec85ad9dddc314","type":"api-call-service","z":"d9e1f7694e10602f","name":"Bulb1BA-low","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"scene","service":"turn_on","areaId":[],"deviceId":[],"entityId":["scene.bathroom_low"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2110,"y":80,"wires":[[]],"info":"{\"transition\":\"0\",\"kelvin\":\"3650\",\"brightness_pct\":\"30\"}\n"},{"id":"e86274d4272e51f7","type":"api-call-service","z":"d9e1f7694e10602f","name":"Bulb1BA-high","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"scene","service":"turn_on","areaId":[],"deviceId":[],"entityId":["scene.bathroom_white"],"data":"{\"transition\":\"2\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2100,"y":160,"wires":[[]]},{"id":"a34c270d521a6173","type":"trigger","z":"d9e1f7694e10602f","name":"Dim","op1":"true","op2":"0","op1type":"bool","op2type":"str","duration":"0","extend":false,"overrideDelay":false,"units":"ms","reset":"true","bytopic":"all","topic":"topic","outputs":1,"x":1130,"y":40,"wires":[["9c268412d205bc98","16707e039ddfc8f8","cb652925512b79bd"]]},{"id":"9c268412d205bc98","type":"trigger","z":"d9e1f7694e10602f","name":"Bright","op1":"true","op2":"0","op1type":"bool","op2type":"str","duration":"0","extend":false,"overrideDelay":false,"units":"ms","reset":"true","bytopic":"all","topic":"topic","outputs":1,"x":1150,"y":100,"wires":[["a34c270d521a6173","5491b4300c9e513a","49ef5718830c1103","4307c942ed9bb6fa","a66a84db4ad03549"]]},{"id":"e7dcb727e3c633c2","type":"api-call-service","z":"d9e1f7694e10602f","name":"grn LED off","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.bath_sense_green"],"data":"{\"transition\":\"0\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2070,"y":640,"wires":[["55443f4ca46a9752"]]},{"id":"a5095d520c35f6a6","type":"trigger","z":"d9e1f7694e10602f","name":"","op1":"","op2":"0","op1type":"date","op2type":"str","duration":"0","extend":false,"overrideDelay":false,"units":"ms","reset":"true","bytopic":"all","topic":"topic","outputs":1,"x":1520,"y":660,"wires":[["06c02b9a7ac7ead0","784b6f5e75cfd860","90db527ba55d7dcf","e7dcb727e3c633c2"]]},{"id":"784b6f5e75cfd860","type":"api-call-service","z":"d9e1f7694e10602f","name":"# of showsers","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"counter","service":"increment","areaId":[],"deviceId":[],"entityId":["counter.showers_done_today"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2080,"y":900,"wires":[[]]},{"id":"fea2497070e9ce73","type":"debug","z":"d9e1f7694e10602f","name":"fan off delay","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1890,"y":1240,"wires":[]},{"id":"d72cb7f0892d9dea","type":"api-current-state","z":"d9e1f7694e10602f","name":"Todays showers ok","server":"ee6cbdefc4886d1a","version":3,"outputs":2,"halt_if":"$number($entities(\"sensor.people_at_home\").state)","halt_if_type":"jsonata","halt_if_compare":"lt","entity_id":"counter.showers_done_today","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"}],"for":0,"forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":430,"y":240,"wires":[["bcacd0341f829fb7","f3e2adba38ef4749","a5095d520c35f6a6","37d19c00c3e79986","9af925b3cbd32c2b","9e739e85e44540ff","e37cc993fca9ab37","6b95ab6dcfce6f1a"],["bacdc90e137a9415","c10a10dcdbd82cd8","a330391bc9e42e59"]],"info":"$number($entities(\"sensor.people_at_home\").state)"},{"id":"37d19c00c3e79986","type":"debug","z":"d9e1f7694e10602f","name":"showers ok?","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":530,"y":360,"wires":[]},{"id":"6d00dcd2e9e96946","type":"api-current-state","z":"d9e1f7694e10602f","name":"R we showering-2","server":"ee6cbdefc4886d1a","version":3,"outputs":2,"halt_if":"$number($entities(\"input_number.bath_humid_set\").state) + $number($entities(\"input_number.shower_constant\").state)","halt_if_type":"jsonata","halt_if_compare":"gt","entity_id":"sensor.bath_sense_humidity_2","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"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":1250,"y":400,"wires":[["7724a3eaf7911aa0","6b95ab6dcfce6f1a"],["33d8085e08834dd7","b484ca795a44bc4e","ebdb209947a1cfaa"]],"info":"$number($entities(\"input_number.bath_humid_set\").state) + $number($entities(\"input_number.shower_constant\").state)\n\n"},{"id":"b2a642731046ae02","type":"debug","z":"d9e1f7694e10602f","name":"true no shower","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1640,"y":520,"wires":[]},{"id":"7cbb30937187627b","type":"api-call-service","z":"d9e1f7694e10602f","name":"input raining","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.ttssay"],"data":"{\"value\":\"Hey everyone! It is raining outside! Stay dry. Thank you.\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1090,"y":1200,"wires":[["49ebbd3311158cbe"]]},{"id":"895f40157d3f0486","type":"api-call-service","z":"d9e1f7694e10602f","name":"say text","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"script","service":"speak_and_resume","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"all","x":2100,"y":1020,"wires":[[]],"info":"$entities(\"input_text.ttssay\").state"},{"id":"06c02b9a7ac7ead0","type":"api-call-service","z":"d9e1f7694e10602f","name":"input shower on","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.ttssay"],"data":"{\"value\":\"2Hay!, Whoever is in here, the shower timer is now turned on. Enjoy!\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2105,"y":860,"wires":[["49ebbd3311158cbe"]]},{"id":"e71e252ba00a9c4c","type":"inject","z":"d9e1f7694e10602f","name":"test shower speak","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1690,"y":380,"wires":[["06c02b9a7ac7ead0"]]},{"id":"bb122fbe1a0b1ed2","type":"delay","z":"d9e1f7694e10602f","name":"hope lwr humid every 77 mins","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"77","rateUnits":"minute","randomFirst":"3","randomLast":"15","randomUnits":"minutes","drop":true,"allowrate":false,"outputs":1,"x":1070,"y":920,"wires":[["6d7994ff473709ef","b9a1c4424710dbec","6b95ab6dcfce6f1a"]]},{"id":"6d7994ff473709ef","type":"debug","z":"d9e1f7694e10602f","name":"Hope","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1330,"y":960,"wires":[]},{"id":"8ce4c023df3b6d7a","type":"api-current-state","z":"d9e1f7694e10602f","name":"more humid than > ih1?","server":"ee6cbdefc4886d1a","version":3,"outputs":2,"halt_if":"$number($entities(\"sensor.ih1_humidity\").state) - 1.0","halt_if_type":"jsonata","halt_if_compare":"gte","entity_id":"sensor.bath_sense_humidity_2","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"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":730,"y":920,"wires":[["6b95ab6dcfce6f1a","03d10539a3d9e7fb"],["008198fbb7756bed","5860a1f28176f19e","bb122fbe1a0b1ed2"]],"info":"sensor.bath_sense_humidity_2\n\n($entities('sensor.bath_sense_humidity_2').state > $entities('sensor.oh1_humidity').state)\n\nJson:\n$entities(\"sensor.oh1_humidity\").state\n\n+1"},{"id":"e0def9651a2df497","type":"link out","z":"d9e1f7694e10602f","name":"Rain red off connect","mode":"link","links":["7c9dc0d905041b8b","5e7914c61e0c97d9"],"x":1980,"y":1740,"wires":[]},{"id":"cd4dbdc50a16de1c","type":"link out","z":"d9e1f7694e10602f","name":"Rain red on connect","mode":"link","links":["c098f323daf43036","3cb96420934fda15"],"x":1980,"y":1680,"wires":[]},{"id":"ab6c5d869c42f991","type":"link out","z":"d9e1f7694e10602f","name":"Humid Blue on connect","mode":"link","links":["6822ebbabb3dae5d","fb99ade464228d28"],"x":1975,"y":1320,"wires":[]},{"id":"896b32378842f73f","type":"link out","z":"d9e1f7694e10602f","name":"Humid Blue off connect","mode":"link","links":["a6e83cdf9d0be7bc","85ce06800199d505"],"x":1975,"y":1520,"wires":[]},{"id":"79246871de6c711e","type":"link out","z":"d9e1f7694e10602f","name":"Getup at night","mode":"link","links":["40ed2856420c303c","17d17d3ec45a1334"],"x":935,"y":60,"wires":[]},{"id":"6a485f567bca78bb","type":"trigger","z":"d9e1f7694e10602f","name":"","op1":"","op2":"0","op1type":"date","op2type":"str","duration":"0","extend":false,"overrideDelay":false,"units":"ms","reset":"true","bytopic":"all","topic":"topic","outputs":1,"x":1075,"y":1120,"wires":[["de0ffdc582ebd7e6"]]},{"id":"de0ffdc582ebd7e6","type":"function","z":"d9e1f7694e10602f","name":"make pulse slow-too humid","func":"msg.payload =\n{\n \"data\": { \"effect\": \"slow\"\n }\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1100,"y":1160,"wires":[["96dd0bfd1acf0dab","78808d73417545e9"]],"info":"msg.payload =\n{\n \"data\": { \"brightness_pct\":\"55\",\n \"effect\": \"slow\"\n }\n};\nreturn msg;"},{"id":"04bbb861f942cb2c","type":"debug","z":"d9e1f7694e10602f","name":"blu light data","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":2090,"y":1420,"wires":[]},{"id":"c1b4019a6249afda","type":"function","z":"d9e1f7694e10602f","name":"make pulse fast","func":"msg.payload =\n{\n \"data\": { \"brightness_pct\":\"25\",\n \"effect\": \"fast\"\n }\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":940,"y":1280,"wires":[["f2cf0ac7da0cf779"]],"info":"msg.payload =\n{\n \"data\": { \"brightness_pct\":\"25\",\n \"effect\": \"fast\"\n }\n};\nreturn msg;"},{"id":"14917171f3bfc17d","type":"function","z":"d9e1f7694e10602f","name":"make pulse fast-shower","func":"msg.payload =\n{\n \"data\": { \"effect\": \"fast\"\n }\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1405,"y":1080,"wires":[["96dd0bfd1acf0dab"]],"info":"msg.payload =\n{\n \"data\": { \"brightness_pct\":\"55\",\n \"effect\": \"fast\"\n }\n};\nreturn msg;"},{"id":"fac47c2086514ac6","type":"trigger","z":"d9e1f7694e10602f","name":"","op1":"","op2":"0","op1type":"date","op2type":"str","duration":"0","extend":false,"overrideDelay":false,"units":"ms","reset":"true","bytopic":"all","topic":"topic","outputs":1,"x":1375,"y":1040,"wires":[["14917171f3bfc17d"]]},{"id":"78808d73417545e9","type":"debug","z":"d9e1f7694e10602f","name":"light data 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1430,"y":1160,"wires":[]},{"id":"d6f9ba68cf62c436","type":"inject","z":"d9e1f7694e10602f","name":"Blue off","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":525,"y":540,"wires":[["3a72325e794f533f"]]},{"id":"55443f4ca46a9752","type":"link out","z":"d9e1f7694e10602f","name":"Motion off","mode":"link","links":["b2644189723488de","79087ff3624389fb"],"x":2175,"y":640,"wires":[]},{"id":"e287a65eabcd9508","type":"debug","z":"d9e1f7694e10602f","name":"LED on?","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":2085,"y":1620,"wires":[]},{"id":"550a1c56fe14e571","type":"trigger-state","z":"d9e1f7694e10602f","name":"Motion Override on","server":"ee6cbdefc4886d1a","version":4,"inputs":0,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.bath_sense_motion_2","entityIdType":"regex","debugEnabled":false,"constraints":[{"targetType":"entity_id","targetValue":"input_boolean.bath_overide","propertyType":"current_state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"off","propertyValue":"new_state.state"}],"customOutputs":[],"outputInitially":true,"stateType":"str","enableInput":false,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":105,"y":300,"wires":[["61ee866f4dd0d368"],[]]},{"id":"c10a10dcdbd82cd8","type":"api-render-template","z":"d9e1f7694e10602f","name":"Check sleeping sws","server":"ee6cbdefc4886d1a","version":0,"template":"{{ states.input_boolean.house_sleep_mode.state == 'on'}}","resultsLocation":"payload","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":305,"y":100,"wires":[["8f1acb5570edacbc","e949f353171ac707"]],"info":" or states.binary_sensor.house_sleep_time.state == \"on\" "},{"id":"8f1acb5570edacbc","type":"switch","z":"d9e1f7694e10602f","name":"to be or not to be","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"True","vt":"str"},{"t":"eq","v":"False","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":305,"y":40,"wires":[["a34c270d521a6173","79246871de6c711e"],["fa5297dd57b22c6a"]]},{"id":"66b813684a992455","type":"api-current-state","z":"d9e1f7694e10602f","name":"Sleeping no","server":"ee6cbdefc4886d1a","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.house_sleep_mode","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"5","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":930,"y":1220,"wires":[["7cbb30937187627b"],[]]},{"id":"4e8c38e09ed68e26","type":"api-call-service","z":"d9e1f7694e10602f","name":"turn sw on","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.bath_light_switch_2"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":190,"y":600,"wires":[[]]},{"id":"089c8fbd7827d7d5","type":"trigger-state","z":"d9e1f7694e10602f","name":"man fan on2","server":"ee6cbdefc4886d1a","version":4,"inputs":0,"outputs":2,"exposeAsEntityConfig":"","entityId":"binary_sensor.bath_sense_fan_10","entityIdType":"regex","debugEnabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"on"}],"customOutputs":[],"outputInitially":false,"stateType":"str","enableInput":false,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":2330,"y":520,"wires":[["318c024a03f2fccd","8656e216843c7b82","ae546a896fac9d98","60168020cfeb90cc"],["318c024a03f2fccd"]],"info":"binary_sensor.bath_sense_fan_10\n\nswitch.bath_fan_switch_2"},{"id":"318c024a03f2fccd","type":"debug","z":"d9e1f7694e10602f","name":"fan on2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":2320,"y":460,"wires":[]},{"id":"9abe2b1865b3b415","type":"comment","z":"d9e1f7694e10602f","name":"update","info":"Description: This is built for a bathroom through the bedroom construct\n\nGreen blink = Movement\nRed solid = Raining\nRed blinking = Thunderstorm\nBlue blink slow = Outside humid > inside\nBlue blink fast = Shower tagged\nGreen solid and Blue blink fast, or Blue blink fast\n = Shower timer on 12 min\n\nBath_PIR64- this last one we added back lines to reset flashers and triggers for fan off\nadded true to fan timer 10 and\nadded \"turn on timer\" to cool fan off\nBath_PIR66- Added reset lines from \"true no shower\" to Dim and bright toggles, because with high humidity bulb would not come on after turning it off\nBath_PIR67- Working on input light timer, changed to 2.5 mins- done\nBath_PIR68- Added link from taking shower to bedroom bright light for 10 min, increased shower timer from 10 to 12 mins\nBath_PIR69- added thunderstorm warning to Audiocast\n---removed link temp untill bathroom sound is in place\nBath_PIR70 - added radio start on bright and stop with light off\nBath_PIR71 - added distribution nodes and more logic to play radio during shower(increase vol), fixed new boolen Its summer node\nBath_PIR72 - adj shower speaker volume down, removed true link from R we showering-1 to shower dist\nBath_PIR73 - added 60 sec. delay to radio off, changed volume up to directly media player\nBath_PIR74 - change feed back of shower timer done to main light on timer. Corrected set volume down. Added sound for fan on 10 mins\nBath_PIR75 - change shower on logic\nBath_PIR76 - corrected shower dist object and turn up and turn down volume \n- added sig cntrl play\nBath_PIR77 - Shower say did not reset, made connection from bulb off to \"trigger&block\" reset\nBath_PIR78 - Correct radio turn off when fan sw is pressed\nBath_PIR79 - Correct high humid and number of showers compared to people in home. Only allow 1 shower per day per person\nBath_PIR80 - Less humid than outside changed fan to offas well as on for >, added delay to speak\nBath_PIR81 - correct shower on when in sleep mode logic, Bulb1 change name occured\nBath_PIR82 - Fix logic when 12min timer runs out, cooler off turn bath fan off\nBath_PIR83 - added Bedroom override, adjust fan for showers\nBath_PIR84 - fix fan not coming on\nBath_PIR85 - new rain detector\nBath_PIR86 - After a couple of updates, humid stat stopped working, added inject reset every 4 hours, added delay to fan on, corrected humid < outside and not summer.\nBath_PIR87 - Fix radio volume going high when bulb shuts off\nBath_PIR88 - Fan turning on and not turning off\nBath_PIR89 - removed turning motion back on for bedroom\nBath_PIR90 - slow rate limit for rain and thunder to msg/1hr\nBath_PIR91 - work on humid lower control.\nBath_PIR92 - Added External reset because of scripts\nBath_PIR93 - add med light when low and waking\nBath_PIR94 - added a delay to shower on light to avoid system bad timing.\n\nBath_PIR96 - Added effect None to blue LED\nBath_PIR97 - fix fan on for 10 mins then shutting off\nBath_PIR98 - Removed sensor sleep time\nBath_PIR99 - added bathlight switch bypass because bulb1 looses connection and we have to toggle power.\nBath_PIR100 - added Bedroom overide during and end of shower.\nBath_PIR101 - try using derivitive blueprint option\nBath_PIR102 - connected bath mothion to bedroom motion because a person has to walk through bedroom to get to bathroom and need light for traverse.\nBath_PIR103 - updated reset button with a helper button\nBath_PIR104 - removed bedroom light on and timer with showering, removed bedroom motion override\nBath_PIR105 - removed connection from Rwe shower2 to tigger 12min","x":70,"y":20,"wires":[]},{"id":"c533f1819ce8e4f2","type":"comment","z":"d9e1f7694e10602f","name":"current timers in use","info":"2.5 min = normal\n12 min = showers\nwith version 67 now with outside slider","x":950,"y":400,"wires":[]},{"id":"f2cf0ac7da0cf779","type":"delay","z":"d9e1f7694e10602f","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1520,"y":1320,"wires":[["12fbf1894588efdb"]]},{"id":"c46ecc00c066109f","type":"delay","z":"d9e1f7694e10602f","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1520,"y":1380,"wires":[["dbe045ea2aa39a16"]]},{"id":"fa26d833a6ade037","type":"trigger","z":"d9e1f7694e10602f","name":"","op1":"","op2":"true","op1type":"nul","op2type":"str","duration":"2","extend":true,"overrideDelay":true,"units":"s","reset":"true","bytopic":"all","topic":"topic","outputs":1,"x":1105,"y":380,"wires":[["6d00dcd2e9e96946","c4cacd0b8c1c6974"]],"l":false},{"id":"bacdc90e137a9415","type":"api-current-state","z":"d9e1f7694e10602f","name":"BA time slider","server":"ee6cbdefc4886d1a","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"input_number.bath_light_timer","state_type":"num","blockInputOverrides":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"}],"for":0,"forType":"num","forUnits":"minutes","override_topic":false,"state_location":"inputState","override_payload":"msg","entity_location":"","override_data":"none","x":940,"y":280,"wires":[["01f131f15d2ec06e"]]},{"id":"01f131f15d2ec06e","type":"change","z":"d9e1f7694e10602f","name":"input delay","rules":[{"t":"set","p":"delay","pt":"msg","to":"msg.payload*60000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":930,"y":340,"wires":[["fa26d833a6ade037","150dd94dbf27f4b9"]]},{"id":"150dd94dbf27f4b9","type":"debug","z":"d9e1f7694e10602f","name":"timer output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1150,"y":300,"wires":[]},{"id":"c4cacd0b8c1c6974","type":"debug","z":"d9e1f7694e10602f","name":"trig time out","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1250,"y":360,"wires":[]},{"id":"9af925b3cbd32c2b","type":"link out","z":"d9e1f7694e10602f","name":"taking shower","mode":"link","links":["5d7b659b06af9f08","62e30f463c015b07"],"x":945,"y":580,"wires":[]},{"id":"3bf0b51351eb43ac","type":"api-call-service","z":"d9e1f7694e10602f","name":"input lightning","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.ttssay"],"data":"{\"value\":\"Hey everyone! Thunderstorms are coming. Dodge the lightning. Take care.\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1040,"y":1360,"wires":[["49ebbd3311158cbe"]]},{"id":"4473b54911307d17","type":"api-current-state","z":"d9e1f7694e10602f","name":"Sleeping no","server":"ee6cbdefc4886d1a","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.house_sleep_mode","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"5","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":870,"y":1380,"wires":[["3bf0b51351eb43ac"],[]]},{"id":"baeaaac63bd55f4b","type":"api-call-service","z":"d9e1f7694e10602f","name":"play radio","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"script","service":"play_radio_ba","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2120,"y":200,"wires":[[]],"info":"$number($entities(\"input_number.bath_humid_set\").state) + $number($entities(\"input_number.shower_constant\").state)\n\n\n"},{"id":"0213b710f55214f2","type":"api-call-service","z":"d9e1f7694e10602f","name":"Stop radio","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"media_player","service":"media_pause","areaId":["bathroom"],"deviceId":["1f927b64a928cbbbbcfebe9340a017f8"],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2130,"y":260,"wires":[["6a1af78ddaba9776","c562b8185e1b4afb"]]},{"id":"90c0c85cdc11211f","type":"change","z":"d9e1f7694e10602f","name":"no true","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":1900,"y":360,"wires":[[]]},{"id":"a745e17f90c23f13","type":"api-render-template","z":"d9e1f7694e10602f","name":"add radio volume","server":"ee6cbdefc4886d1a","version":0,"template":"{% set test = ((states(\"input_number.radio_volume_ba\") | float + 0.20) * 1000 )| round(0) | int / 1000 %}\n {% if test > 1 %}\n {% set test = 1 %}\n {{ test }}\n {%- else -%}\n{{ test }}\n{%- endif %}","resultsLocation":"payload","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":1470,"y":180,"wires":[["0c6c655c63fe674d","9d46ce5357c515f7"]],"info":"input_number.radio_volume_ba\n\n$number($entities(\"input_number.bath_humid_set\").state) + $number($entities(\"input_number.shower_constant\").state)"},{"id":"d144dc991d7292ea","type":"debug","z":"d9e1f7694e10602f","name":"Sh dist","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":830,"y":160,"wires":[]},{"id":"9e739e85e44540ff","type":"change","z":"d9e1f7694e10602f","name":"shower dist","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":810,"y":120,"wires":[["9c268412d205bc98","d144dc991d7292ea","6a1af78ddaba9776"]],"info":"J:\n$sum(payload+20)"},{"id":"fa5297dd57b22c6a","type":"change","z":"d9e1f7694e10602f","name":"dist","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":750,"y":80,"wires":[["9c268412d205bc98","79246871de6c711e"]]},{"id":"6a1af78ddaba9776","type":"trigger","z":"d9e1f7694e10602f","name":"sig cntrl vol","op1":"true","op2":"0","op1type":"bool","op2type":"str","duration":"0","extend":false,"overrideDelay":false,"units":"ms","reset":"true","bytopic":"all","topic":"topic","outputs":1,"x":1110,"y":180,"wires":[["8203de8cb258e87b","fa26d833a6ade037","79cdc78ab0e96403"]]},{"id":"8203de8cb258e87b","type":"debug","z":"d9e1f7694e10602f","name":"sig cntrl vol","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1110,"y":240,"wires":[]},{"id":"ce3fc5cd4819a552","type":"inject","z":"d9e1f7694e10602f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":720,"y":200,"wires":[["9e739e85e44540ff"]]},{"id":"0c6c655c63fe674d","type":"api-call-service","z":"d9e1f7694e10602f","name":"turn up the vol","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"media_player","service":"volume_set","areaId":[],"deviceId":[],"entityId":["media_player.soundsystem_a226"],"data":"{ \"volume_level\":\"{{payload}}\" }","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2100,"y":320,"wires":[[]],"info":"{ $number(\"volume_level\": \"{{payload}}\") }\n\nworks\n{ \"volume_level\":\"{{payload}}\" }"},{"id":"9455e3e6562b2627","type":"api-call-service","z":"d9e1f7694e10602f","name":"turn down the vol","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"media_player","service":"volume_set","areaId":[],"deviceId":[],"entityId":["media_player.soundsystem_a226"],"data":"{ \"volume_level\":$number($entities(\"input_number.radio_vol_ba_save\").state) }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2110,"y":380,"wires":[[]],"info":"works\n{ \"volume_level\":$number($entities(\"input_number.radio_vol_ba_save\").state) }"},{"id":"2e01592c5bcb5b95","type":"inject","z":"d9e1f7694e10602f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1720,"y":340,"wires":[["90c0c85cdc11211f"]]},{"id":"a66a84db4ad03549","type":"api-call-service","z":"d9e1f7694e10602f","name":"save vol1","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"input_number","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_number.radio_vol_ba_save"],"data":"{\"value\":$number($entities(\"input_number.radio_volume_ba\").state) }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1700,"y":100,"wires":[["e86274d4272e51f7"]]},{"id":"9c974d0ce518527c","type":"api-current-state","z":"d9e1f7694e10602f","name":"its summer hh","server":"ee6cbdefc4886d1a","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.its_summer","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"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":140,"y":660,"wires":[["c2a83942c7824b9a"],["5a4b2ceedf647e2b"]]},{"id":"47f6a5353c957240","type":"api-current-state","z":"d9e1f7694e10602f","name":"its summer lh","server":"ee6cbdefc4886d1a","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"input_boolean.its_summer","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"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":260,"y":820,"wires":[["08fb8fa9a67bfbf3"],["008198fbb7756bed"]]},{"id":"a8f02a6eded2b3d3","type":"trigger-state","z":"d9e1f7694e10602f","name":"keep light sw on","server":"ee6cbdefc4886d1a","version":4,"inputs":0,"outputs":2,"exposeAsEntityConfig":"","entityId":"switch.bath_light_switch_2","entityIdType":"regex","debugEnabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"off"}],"customOutputs":[],"outputInitially":false,"stateType":"str","enableInput":false,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":110,"y":460,"wires":[["3276148a289342b9"],[]]},{"id":"8656e216843c7b82","type":"trigger","z":"d9e1f7694e10602f","name":"fan timer 10","op1":"","op2":"true","op1type":"nul","op2type":"bool","duration":"10","extend":true,"overrideDelay":false,"units":"min","reset":"true","bytopic":"all","topic":"topic","outputs":1,"x":2610,"y":760,"wires":[["cf20a93dc6775019","008198fbb7756bed"]]},{"id":"6fdf1d63b9800678","type":"change","z":"d9e1f7694e10602f","name":"tmstamp2","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":1480,"y":320,"wires":[["4307c942ed9bb6fa"]]},{"id":"5491b4300c9e513a","type":"debug","z":"d9e1f7694e10602f","name":"light trig Bright","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1360,"y":80,"wires":[]},{"id":"e04b116d5848c661","type":"api-call-service","z":"d9e1f7694e10602f","name":"fan on 10 mins","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.ttssay"],"data":"{\"value\":\"2fan on for 10 minutes. Enjoy!\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2620,"y":560,"wires":[["0213b710f55214f2","e86d17f155276030","49ebbd3311158cbe"]]},{"id":"d793b1ff5549a5b5","type":"trigger","z":"d9e1f7694e10602f","name":"play radio","op1":"true","op2":"0","op1type":"bool","op2type":"str","duration":"0","extend":false,"overrideDelay":false,"units":"ms","reset":"true","bytopic":"all","topic":"topic","outputs":1,"x":1740,"y":200,"wires":[["4307c942ed9bb6fa","baeaaac63bd55f4b"]]},{"id":"4307c942ed9bb6fa","type":"trigger","z":"d9e1f7694e10602f","name":"stop radio 1min delay","op1":"","op2":"true","op1type":"nul","op2type":"bool","duration":"1","extend":true,"overrideDelay":false,"units":"min","reset":"true","bytopic":"all","topic":"topic","outputs":1,"x":1740,"y":260,"wires":[["d793b1ff5549a5b5","0213b710f55214f2"]]},{"id":"49ef5718830c1103","type":"change","z":"d9e1f7694e10602f","name":"tmstamp1","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":1520,"y":120,"wires":[["d793b1ff5549a5b5"]]},{"id":"9d46ce5357c515f7","type":"debug","z":"d9e1f7694e10602f","name":"vol output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1440,"y":260,"wires":[]},{"id":"55dc45b9fc5c7c12","type":"inject","z":"d9e1f7694e10602f","name":"test radio stop","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":2410,"y":340,"wires":[["8656e216843c7b82","ae546a896fac9d98","60168020cfeb90cc"]]},{"id":"3cc13eff400928a2","type":"api-call-service","z":"d9e1f7694e10602f","name":"set radio none","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"input_select","service":"select_option","areaId":[],"deviceId":[],"entityId":["input_select.radio_station_ba_2"],"data":"{\"option\":\"none\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2600,"y":520,"wires":[["e04b116d5848c661"]]},{"id":"ae546a896fac9d98","type":"api-call-service","z":"d9e1f7694e10602f","name":"save set","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.mpdcheck"],"data":"{\"value\":$entities(\"input_select.radio_station_ba_2\").state }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2600,"y":420,"wires":[["28b3a6154017429a"]]},{"id":"28b3a6154017429a","type":"delay","z":"d9e1f7694e10602f","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":2600,"y":480,"wires":[["3cc13eff400928a2"]]},{"id":"5293ad16477ac6f4","type":"api-call-service","z":"d9e1f7694e10602f","name":"set back","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"input_select","service":"select_option","areaId":["bathroom"],"deviceId":[],"entityId":["input_select.radio_station_ba_2"],"data":"{\"option\":$entities(\"input_text.mpdcheck\").state }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2700,"y":700,"wires":[[]]},{"id":"1421aacec51ec141","type":"api-current-state","z":"d9e1f7694e10602f","name":"wait for script ba off","server":"ee6cbdefc4886d1a","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":"script.play_radio_ba","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"","forType":"num","forUnits":"seconds","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":2630,"y":660,"wires":[["5293ad16477ac6f4"],[]]},{"id":"e86d17f155276030","type":"delay","z":"d9e1f7694e10602f","name":"","pauseType":"delay","timeout":"20","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":2600,"y":600,"wires":[["1421aacec51ec141"]]},{"id":"7724a3eaf7911aa0","type":"api-current-state","z":"d9e1f7694e10602f","name":"Todays showers ok","server":"ee6cbdefc4886d1a","version":3,"outputs":2,"halt_if":"$number($entities(\"sensor.people_at_home\").state)","halt_if_type":"jsonata","halt_if_compare":"lt","entity_id":"counter.showers_done_today","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"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":1210,"y":520,"wires":[["9af925b3cbd32c2b","9e739e85e44540ff","fac47c2086514ac6","e37cc993fca9ab37","bcacd0341f829fb7","a5095d520c35f6a6","f3e2adba38ef4749"],["b484ca795a44bc4e"]],"info":"$number($entities(\"sensor.people_at_home\").state)"},{"id":"90db527ba55d7dcf","type":"debug","z":"d9e1f7694e10602f","name":"shower inc","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1750,"y":760,"wires":[]},{"id":"16707e039ddfc8f8","type":"debug","z":"d9e1f7694e10602f","name":"light trig low","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1350,"y":20,"wires":[]},{"id":"49ebbd3311158cbe","type":"delay","z":"d9e1f7694e10602f","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1900,"y":980,"wires":[["895f40157d3f0486"]]},{"id":"e37cc993fca9ab37","type":"api-call-service","z":"d9e1f7694e10602f","name":"motion on","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"input_boolean","service":"turn_on","areaId":[],"deviceId":[],"entityId":["input_boolean.bath_overide"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2020,"y":440,"wires":[[]]},{"id":"d0ab044e7422ec37","type":"api-call-service","z":"d9e1f7694e10602f","name":"motion off","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"input_boolean","service":"turn_off","areaId":[],"deviceId":[],"entityId":["input_boolean.bath_overide"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2060,"y":480,"wires":[[]]},{"id":"a9ed2dfea135d344","type":"debug","z":"d9e1f7694e10602f","name":"fan on1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1060,"y":600,"wires":[]},{"id":"2128e240cd83d085","type":"debug","z":"d9e1f7694e10602f","name":"reset toggles off","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1760,"y":900,"wires":[]},{"id":"0066a249fe0bc5b3","type":"delay","z":"d9e1f7694e10602f","name":"","pauseType":"delay","timeout":"33","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1900,"y":1020,"wires":[["60168020cfeb90cc","0698300e27ee0877"]]},{"id":"0698300e27ee0877","type":"debug","z":"d9e1f7694e10602f","name":"shower on delay","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":2120,"y":1080,"wires":[]},{"id":"a330391bc9e42e59","type":"debug","z":"d9e1f7694e10602f","name":"stop showers","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":530,"y":400,"wires":[]},{"id":"6b95ab6dcfce6f1a","type":"delay","z":"d9e1f7694e10602f","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":740,"y":640,"wires":[["d6c10895eeac6207","49fad5b9801b6957"]]},{"id":"49fad5b9801b6957","type":"debug","z":"d9e1f7694e10602f","name":"delay","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":810,"y":580,"wires":[]},{"id":"c562b8185e1b4afb","type":"debug","z":"d9e1f7694e10602f","name":"stop radio","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":2260,"y":300,"wires":[]},{"id":"79cdc78ab0e96403","type":"delay","z":"d9e1f7694e10602f","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1280,"y":180,"wires":[["a745e17f90c23f13"]]},{"id":"e6ef6658fdc319a9","type":"change","z":"d9e1f7694e10602f","name":"timer start","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":1140,"y":760,"wires":[["cf20a93dc6775019"]]},{"id":"179dc34ec8127fbe","type":"delay","z":"d9e1f7694e10602f","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"hour","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"allowrate":false,"outputs":1,"x":690,"y":1360,"wires":[["4473b54911307d17"]]},{"id":"7c227f78661bc28f","type":"delay","z":"d9e1f7694e10602f","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"hour","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"allowrate":false,"outputs":1,"x":730,"y":1200,"wires":[["66b813684a992455"]]},{"id":"dcbee3af7ba569f3","type":"debug","z":"d9e1f7694e10602f","name":"After 45 min","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1690,"y":820,"wires":[]},{"id":"f21a445a739e12c4","type":"change","z":"d9e1f7694e10602f","name":"Bath fan reset","rules":[{"t":"set","p":"payload","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":460,"wires":[["8656e216843c7b82","6a485f567bca78bb","788d86942fe5af81","1843bd5acc6d8671","fac47c2086514ac6","008198fbb7756bed","11f90a6c3237e1ee","d6c10895eeac6207"]]},{"id":"7379d8ba2e879d8a","type":"server-state-changed","z":"d9e1f7694e10602f","name":"Bath fan reset","server":"ee6cbdefc4886d1a","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"input_button.reset_bath1","entityIdType":"regex","outputInitially":false,"stateType":"str","ifState":"on","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":false,"for":"0","forType":"num","forUnits":"seconds","ignorePrevStateNull":true,"ignorePrevStateUnknown":true,"ignorePrevStateUnavailable":true,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":true,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":330,"y":460,"wires":[[],["b05057f0c1cad7d6","f21a445a739e12c4"]]},{"id":"b05057f0c1cad7d6","type":"debug","z":"d9e1f7694e10602f","name":"Bath reset","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":370,"y":540,"wires":[]},{"id":"cf20a93dc6775019","type":"delay","z":"d9e1f7694e10602f","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1820,"y":1120,"wires":[["fea2497070e9ce73","0a0bde4d579356c8"]]},{"id":"95f754a7fae0f5d0","type":"api-call-service","z":"d9e1f7694e10602f","name":"Bulb1BA-med","server":"ee6cbdefc4886d1a","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":["70af5abd105cae66d797c5ae762ecc90"],"entityId":[],"data":"{\"brightness_pct\":\"50\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":2080,"y":20,"wires":[[]]},{"id":"7ac73aee132bd3b3","type":"debug","z":"d9e1f7694e10602f","name":"BA med","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":2300,"y":60,"wires":[]},{"id":"6bfc0d5264c3cb67","type":"debug","z":"d9e1f7694e10602f","name":"BA low","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":2290,"y":140,"wires":[]},{"id":"c8cc0a18b4c9a8d8","type":"switch","z":"d9e1f7694e10602f","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":1710,"y":40,"wires":[["95f754a7fae0f5d0","7ac73aee132bd3b3"],["e1ec85ad9dddc314","6bfc0d5264c3cb67"]]},{"id":"98d6c8a3ede72f43","type":"debug","z":"d9e1f7694e10602f","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1800,"y":80,"wires":[]},{"id":"e949f353171ac707","type":"debug","z":"d9e1f7694e10602f","name":"sleeping tpl","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":550,"y":60,"wires":[]},{"id":"cb652925512b79bd","type":"change","z":"d9e1f7694e10602f","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":1300,"y":40,"wires":[["7af1ccd4d0239870"]]},{"id":"7af1ccd4d0239870","type":"api-current-state","z":"d9e1f7694e10602f","name":"is wake2 running","server":"ee6cbdefc4886d1a","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"script.wake2","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"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":1530,"y":40,"wires":[["c8cc0a18b4c9a8d8","98d6c8a3ede72f43"],["c8cc0a18b4c9a8d8","98d6c8a3ede72f43"]]},{"id":"ebdb209947a1cfaa","type":"function","z":"d9e1f7694e10602f","name":"make pulse None","func":"msg.payload =\n{\n \"data\": { \"effect\": \"None\"\n }\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1390,"y":780,"wires":[["96dd0bfd1acf0dab"]],"info":"msg.payload =\n{\n \"data\": { \"brightness_pct\":\"55\",\n \"effect\": \"fast\"\n }\n};\nreturn msg;"},{"id":"3276148a289342b9","type":"api-current-state","z":"d9e1f7694e10602f","name":"Bath motion off?","server":"ee6cbdefc4886d1a","version":3,"outputs":2,"halt_if":"false","halt_if_type":"bool","halt_if_compare":"is","entity_id":"input_boolean.bath_overide","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"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":140,"y":540,"wires":[["4e8c38e09ed68e26"],[]]},{"id":"ee6cbdefc4886d1a","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]