[{"id":"4bdffe429d64f7fc","type":"poll-state","z":"a272f711.6b7f58","name":"Flair HVAC Mode","server":"c6781990.503538","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"30","updateIntervalType":"num","updateIntervalUnits":"seconds","outputinitially":true,"outputonchanged":false,"entity_id":"climate.office_room","state_type":"str","halt_if":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"x":100,"y":1480,"wires":[["f9bd6c15a2c721d2"]]},{"id":"f9bd6c15a2c721d2","type":"function","z":"a272f711.6b7f58","name":"","func":"flow.set(\"currentmode\", msg.data.state);\nflow.set(\"uppertemp\", msg.data.attributes.temperature + 1);\nflow.set(\"lowertemp\", msg.data.attributes.temperature - 1);\n\nmsg.payload = {\n \"mode\": flow.get(\"currentmode\"),\n \"upper_temp\": flow.get(\"uppertemp\"),\n \"lower_temp\": flow.get(\"lowertemp\")\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":400,"y":1480,"wires":[[]]},{"id":"18cee6f11cb3f0b7","type":"switch","z":"a272f711.6b7f58","name":"Lower & Upper Temp","property":"payload","propertyType":"msg","rules":[{"t":"lte","v":"lowertemp","vt":"flow"},{"t":"gte","v":"uppertemp","vt":"flow"}],"checkall":"true","repair":false,"outputs":2,"x":400,"y":1660,"wires":[["5a323afbb31b82ca"],["92465128533dcbe4"]]},{"id":"dfb1fa7ff6387c15","type":"poll-state","z":"a272f711.6b7f58","name":"Upstairs Bathroom Temp","server":"c6781990.503538","version":2,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"30","updateIntervalType":"num","updateIntervalUnits":"seconds","outputinitially":true,"outputonchanged":true,"entity_id":"sensor.upstairs_bathroom_humidity_sensor_temperature","state_type":"num","halt_if":"","halt_if_type":"num","halt_if_compare":"is","outputs":1,"x":130,"y":1660,"wires":[["18cee6f11cb3f0b7"]]},{"id":"5a323afbb31b82ca","type":"switch","z":"a272f711.6b7f58","name":"Current Mode","property":"currentmode","propertyType":"flow","rules":[{"t":"eq","v":"cool","vt":"str"},{"t":"eq","v":"heat","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":620,"y":1320,"wires":[["d3a5b8e0ade15567"],["b4af2ec9cd707b40"]]},{"id":"92465128533dcbe4","type":"switch","z":"a272f711.6b7f58","name":"Current Mode","property":"currentmode","propertyType":"flow","rules":[{"t":"eq","v":"cool","vt":"str"},{"t":"eq","v":"heat","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":620,"y":1940,"wires":[["e4932d1a35eef6b4"],["0cb29731d2b2d3a1"]]},{"id":"d3a5b8e0ade15567","type":"api-current-state","z":"a272f711.6b7f58","name":"Vent Open?","server":"c6781990.503538","version":3,"outputs":2,"halt_if":"open","halt_if_type":"str","halt_if_compare":"is","entity_id":"cover.upstairs_bathroom_vent","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":850,"y":1200,"wires":[["8b71850592289e40"],[]]},{"id":"b4af2ec9cd707b40","type":"api-current-state","z":"a272f711.6b7f58","name":"Vent Closed?","server":"c6781990.503538","version":3,"outputs":2,"halt_if":"closed","halt_if_type":"str","halt_if_compare":"is","entity_id":"cover.upstairs_bathroom_vent","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":850,"y":1480,"wires":[["47af2f5c13231cdf"],[]]},{"id":"8b71850592289e40","type":"api-call-service","z":"a272f711.6b7f58","name":"Close Vent","server":"c6781990.503538","version":5,"debugenabled":false,"domain":"cover","service":"set_cover_tilt_position","areaId":[],"deviceId":[],"entityId":["cover.upstairs_bathroom_vent"],"data":"{\"tilt_position\":0}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"payload","output_location_type":"none","x":1070,"y":1200,"wires":[[]]},{"id":"47af2f5c13231cdf","type":"api-call-service","z":"a272f711.6b7f58","name":"Open Vent","server":"c6781990.503538","version":5,"debugenabled":false,"domain":"cover","service":"set_cover_tilt_position","areaId":[],"deviceId":[],"entityId":["cover.upstairs_bathroom_vent"],"data":"{\"tilt_position\":100}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"payload","output_location_type":"none","x":1070,"y":1480,"wires":[[]]},{"id":"e4932d1a35eef6b4","type":"api-current-state","z":"a272f711.6b7f58","name":"Vent Closed?","server":"c6781990.503538","version":3,"outputs":2,"halt_if":"closed","halt_if_type":"str","halt_if_compare":"is","entity_id":"cover.upstairs_bathroom_vent","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":850,"y":1840,"wires":[["ff4193e5d71a04e6"],[]]},{"id":"ff4193e5d71a04e6","type":"api-call-service","z":"a272f711.6b7f58","name":"Open Vent","server":"c6781990.503538","version":5,"debugenabled":false,"domain":"cover","service":"set_cover_tilt_position","areaId":[],"deviceId":[],"entityId":["cover.upstairs_bathroom_vent"],"data":"{\"tilt_position\":100}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"payload","output_location_type":"none","x":1070,"y":1840,"wires":[[]]},{"id":"0cb29731d2b2d3a1","type":"api-current-state","z":"a272f711.6b7f58","name":"Vent Open?","server":"c6781990.503538","version":3,"outputs":2,"halt_if":"open","halt_if_type":"str","halt_if_compare":"is","entity_id":"cover.upstairs_bathroom_vent","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":850,"y":2060,"wires":[["23a3c1a714c3b23d"],[]]},{"id":"23a3c1a714c3b23d","type":"api-call-service","z":"a272f711.6b7f58","name":"Close Vent","server":"c6781990.503538","version":5,"debugenabled":false,"domain":"cover","service":"set_cover_tilt_position","areaId":[],"deviceId":[],"entityId":["cover.upstairs_bathroom_vent"],"data":"{\"tilt_position\":0}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"payload","output_location_type":"none","x":1070,"y":2060,"wires":[[]]},{"id":"21952a0172626f5d","type":"catch","z":"a272f711.6b7f58","name":"Heat Vent Open Error","scope":["47af2f5c13231cdf"],"uncaught":false,"x":660,"y":1600,"wires":[["4aac71de140aef60"]]},{"id":"4aac71de140aef60","type":"stoptimer","z":"a272f711.6b7f58","duration":"30","units":"Second","payloadtype":"num","payloadval":"0","name":"30S","x":870,"y":1600,"wires":[["e23e0723915de143","47af2f5c13231cdf"],[]]},{"id":"e23e0723915de143","type":"api-call-service","z":"a272f711.6b7f58","name":"Robert iPhone Notification","server":"c6781990.503538","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_robert_iphone","areaId":[],"deviceId":[],"entityId":[],"data":"{\"title\":\"Upstairs Bathroom Vent\",\"message\":\"Failed to open. Retrying now.\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"payload","output_location_type":"none","x":1100,"y":1600,"wires":[[]]},{"id":"db42a0214a7ef352","type":"catch","z":"a272f711.6b7f58","name":"Cool Vent Close Error","scope":["8b71850592289e40"],"uncaught":false,"x":660,"y":1080,"wires":[["12e93092d3f0c6df"]]},{"id":"12e93092d3f0c6df","type":"stoptimer","z":"a272f711.6b7f58","duration":"30","units":"Second","payloadtype":"num","payloadval":"0","name":"30S","x":870,"y":1080,"wires":[["9a2cfd777d7dacab","8b71850592289e40"],[]]},{"id":"9a2cfd777d7dacab","type":"api-call-service","z":"a272f711.6b7f58","name":"Robert iPhone Notification","server":"c6781990.503538","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_robert_iphone","areaId":[],"deviceId":[],"entityId":[],"data":"{\"title\":\"Upstairs Bathroom Vent\",\"message\":\"Failed to close. Retrying now.\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"payload","output_location_type":"none","x":1100,"y":1080,"wires":[[]]},{"id":"7343d5b47f14b6ce","type":"catch","z":"a272f711.6b7f58","name":"Cool Vent Open Error","scope":["ff4193e5d71a04e6"],"uncaught":false,"x":660,"y":1720,"wires":[["d2080871fdece70e"]]},{"id":"d2080871fdece70e","type":"stoptimer","z":"a272f711.6b7f58","duration":"30","units":"Second","payloadtype":"num","payloadval":"0","name":"30S","x":870,"y":1720,"wires":[["a283af2cc79d5860","ff4193e5d71a04e6"],[]]},{"id":"a283af2cc79d5860","type":"api-call-service","z":"a272f711.6b7f58","name":"Robert iPhone Notification","server":"c6781990.503538","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_robert_iphone","areaId":[],"deviceId":[],"entityId":[],"data":"{\"title\":\"Upstairs Bathroom Vent\",\"message\":\"Failed to open. Retrying now.\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"payload","output_location_type":"none","x":1100,"y":1720,"wires":[[]]},{"id":"b8799d42a6ce17b0","type":"catch","z":"a272f711.6b7f58","name":"Heat Vent Close Error","scope":["23a3c1a714c3b23d"],"uncaught":false,"x":680,"y":2180,"wires":[["260694937934aea1"]]},{"id":"260694937934aea1","type":"stoptimer","z":"a272f711.6b7f58","duration":"30","units":"Second","payloadtype":"num","payloadval":"0","name":"30S","x":890,"y":2180,"wires":[["6bb704b6e65c7b83","23a3c1a714c3b23d"],[]]},{"id":"6bb704b6e65c7b83","type":"api-call-service","z":"a272f711.6b7f58","name":"Robert iPhone Notification","server":"c6781990.503538","version":5,"debugenabled":false,"domain":"notify","service":"mobile_app_robert_iphone","areaId":[],"deviceId":[],"entityId":[],"data":"{\"title\":\"Upstairs Bathroom Vent\",\"message\":\"Failed to close. Retrying now.\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"payload","output_location_type":"none","x":1120,"y":2180,"wires":[[]]},{"id":"c6781990.503538","type":"server","name":"Home Assistant","version":4,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"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"}]