-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathflows.json
1 lines (1 loc) · 220 KB
/
flows.json
1
[{"id":"5a64306a.6fec98","type":"tab","label":"Presence","disabled":false,"info":"This flow tracks if anybody is home and marks the house occupied or away."},{"id":"39462126.29efee","type":"tab","label":"Vacation","disabled":false,"info":""},{"id":"3413a3a8.0b47ec","type":"tab","label":"Housemode","disabled":false,"info":""},{"id":"395a3554.de723a","type":"tab","label":"WakeUp Alarm","disabled":false,"info":"This routine controls wakeup light routines"},{"id":"d149ef89.67e71","type":"tab","label":"WFH2","disabled":false,"info":""},{"id":"6de607f3.8ca218","type":"tab","label":"NFC","disabled":false,"info":""},{"id":"75150d47.109fb4","type":"tab","label":"Test","disabled":false,"info":""},{"id":"9ab9f198.285b1","type":"tab","label":"Scheduled lighting","disabled":false,"info":""},{"id":"3d183616.022e8a","type":"tab","label":"Motion Lighting","disabled":false,"info":""},{"id":"9eeb0d55.a72a4","type":"tab","label":"Lighting displays","disabled":false,"info":""},{"id":"23f7f7ea.b0c258","type":"tab","label":"WLED","disabled":false,"info":""},{"id":"6006f1f.70c981","type":"tab","label":"HVAC","disabled":false,"info":""},{"id":"6a42a57e.13de6c","type":"tab","label":"System","disabled":false,"info":""},{"id":"2f176f59.aa012","type":"tab","label":"DOWENEED","disabled":true,"info":""},{"id":"d78a1efb.7cd88","type":"subflow","name":"lights off except payload","info":"","category":"","in":[{"x":40,"y":60,"wires":[{"id":"f3f71bc3.c6e128"}]}],"out":[],"env":[],"color":"#DDAA99"},{"id":"d3a6c9b0.41f988","type":"subflow","name":"Set Comfort Temp","info":"","category":"climate","in":[{"x":40,"y":100,"wires":[{"id":"770e72c.29fd18c"}]}],"out":[],"env":[],"color":"#3FADB5"},{"id":"543e2171.45071","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true},{"id":"a67ec1d5.a78ec8","type":"ui_base","theme":{"name":"theme-dark","lightTheme":{"default":"#0094CE","baseColor":"#0094CE","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"darkTheme":{"default":"#097479","baseColor":"#1c53ba","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif","edited":true,"reset":false},"customTheme":{"name":"Untitled Theme 1","default":"#4B7930","baseColor":"#4B7930","baseFont":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"},"themeState":{"base-color":{"default":"#097479","value":"#097479","edited":true},"page-titlebar-backgroundColor":{"value":"#1c53ba","edited":false},"page-backgroundColor":{"value":"#111111","edited":false},"page-sidebar-backgroundColor":{"value":"#333333","edited":false},"group-textColor":{"value":"#4079e2","edited":false},"group-borderColor":{"value":"#555555","edited":false},"group-backgroundColor":{"value":"#333333","edited":false},"widget-textColor":{"value":"#eeeeee","edited":false},"widget-backgroundColor":{"value":"#1c53ba","edited":false},"widget-borderColor":{"value":"#333333","edited":false},"base-font":{"value":"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"}},"angularTheme":{"primary":"indigo","accents":"blue","warn":"red","background":"grey"}},"site":{"name":"Media Room","hideToolbar":"true","allowSwipe":"false","lockMenu":"true","allowTempTheme":"true","dateFormat":"MM/DD/YYYY","sizes":{"sx":50,"sy":50,"gx":6,"gy":6,"cx":6,"cy":6,"px":0,"py":0}}},{"id":"19f2fec8.28ebf1","type":"mqtt-broker","name":"HASSIO Mosquitto Broker","broker":"10.20.0.22","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"d203097b.0b0fe8","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false},{"id":"830a64ce.10cec","type":"server-state-changed","z":"5a64306a.6fec98","name":"Jen Home","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.jenhome","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"x":100,"y":560,"wires":[["5b9b7858.adcca"]]},{"id":"e4a27db.5c01d","type":"server-state-changed","z":"5a64306a.6fec98","name":"CJ Home","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.cjhome","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"x":101.5,"y":619,"wires":[["7f938739.0fefe8"]]},{"id":"2fd6c525.e0406a","type":"api-current-state","z":"5a64306a.6fec98","name":"Jen Home","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.jenhome","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":610,"y":680,"wires":[["deecaa1c.884128"],[]]},{"id":"15906abb.f6fcbd","type":"api-current-state","z":"5a64306a.6fec98","name":"CJ Home","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.cjhome","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":600,"y":620,"wires":[["deecaa1c.884128"],[]]},{"id":"78c7a910.298c08","type":"api-current-state","z":"5a64306a.6fec98","name":"House Guests","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.houseguests","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1000,"y":740,"wires":[["36807d52.25b5e2"],[]]},{"id":"36807d52.25b5e2","type":"api-call-service","z":"5a64306a.6fec98","name":"Away","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.occupied","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1170,"y":680,"wires":[[]]},{"id":"453c4ca8.cc1ba4","type":"api-call-service","z":"5a64306a.6fec98","name":"CJ Home","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.cjhome","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":300,"y":100,"wires":[[]]},{"id":"514f7f23.60043","type":"api-call-service","z":"5a64306a.6fec98","name":"CJ Away","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.cjhome","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":300,"y":40,"wires":[[]]},{"id":"6f0bfe60.f83b7","type":"api-call-service","z":"5a64306a.6fec98","name":"Jen Away","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.jenhome","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":300,"y":160,"wires":[[]]},{"id":"ac1c1d9c.e049e","type":"api-call-service","z":"5a64306a.6fec98","name":"Home","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.occupied","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":590,"y":560,"wires":[[]]},{"id":"6a79b8ad.dfee7","type":"server-state-changed","z":"5a64306a.6fec98","name":"Guests Home","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.houseguests","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"x":95.5,"y":772,"wires":[["f91db820.964808"]]},{"id":"8d172939.4a0e88","type":"api-current-state","z":"5a64306a.6fec98","name":"CJ Home","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.cjhome","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":600,"y":740,"wires":[["ea980aaf.ecd08"],[]]},{"id":"ea980aaf.ecd08","type":"api-current-state","z":"5a64306a.6fec98","name":"Jen Home","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.jenhome","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":790,"y":740,"wires":[["78c7a910.298c08"],[]]},{"id":"f6a3e59c.298908","type":"bigtimer","z":"9ab9f198.285b1","outtopic":"","outpayload1":"on","outpayload2":"off","name":"Exterior Light Timer","comment":"Dusk to Dawn timer","lat":"42.64036","lon":"-83.13634","starttime":"5004","endtime":"5003","starttime2":0,"endtime2":0,"startoff":"-5","endoff":"-5","startoff2":0,"endoff2":0,"offs":0,"outtext1":"on","outtext2":"off","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":"","month7":"","day8":"","month8":"","day9":"","month9":"","day10":"","month10":"","day11":"","month11":"","day12":"","month12":"","d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":true,"atstart":false,"odd":false,"even":false,"x":690,"y":160,"wires":[["a54b5a39.60b848"],[],[]]},{"id":"a346cc18.22b1b8","type":"inject","z":"9ab9f198.285b1","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"on","payloadType":"str","x":190,"y":100,"wires":[["f6a3e59c.298908"]]},{"id":"7c09733f.a18cbc","type":"inject","z":"9ab9f198.285b1","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"off","payloadType":"str","x":190,"y":140,"wires":[["f6a3e59c.298908"]]},{"id":"c264ad41.ac7d","type":"inject","z":"9ab9f198.285b1","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"auto","payloadType":"str","x":190,"y":180,"wires":[["f6a3e59c.298908","c90a3369.ce513"]]},{"id":"a54b5a39.60b848","type":"switch","z":"9ab9f198.285b1","name":"Gen. Ext. Lights switch","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":920,"y":140,"wires":[["5093382.c7740c8","92300bb5.89d3a8","f94b1926.cd7d18"],["a3326c4b.49c31","dbc0a4b9.3579f8","2a28a993.a1e6c6"]]},{"id":"b8eed97b.8a2b8","type":"api-call-service","z":"5a64306a.6fec98","name":"Tori Home","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.torihome","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":310,"y":340,"wires":[[]]},{"id":"79c7a2cb.245ca4","type":"api-call-service","z":"5a64306a.6fec98","name":"Tori Away","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.torihome","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":300,"y":280,"wires":[[]]},{"id":"d3dd8630.0ed3e","type":"api-call-service","z":"5a64306a.6fec98","name":"Seb Away","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.sebhome","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":300,"y":400,"wires":[[]]},{"id":"2187585a.4b6b9","type":"server-state-changed","z":"5a64306a.6fec98","name":"Tori Home","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.torihome","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"x":104.5,"y":675,"wires":[["f91db820.964808"]]},{"id":"552dafb1.b0a2e8","type":"server-state-changed","z":"5a64306a.6fec98","name":"Seb Home","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.sebhome","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"x":104.5,"y":722,"wires":[["f91db820.964808"]]},{"id":"44fa7ef7.f4738","type":"switch","z":"9ab9f198.285b1","name":"Mode switch","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Auto","vt":"str"},{"t":"eq","v":"On","vt":"str"},{"t":"eq","v":"Off","vt":"str"},{"t":"eq","v":"Manual","vt":"str"},{"t":"eq","v":"Disabled","vt":"str"}],"checkall":"false","repair":false,"outputs":5,"x":170,"y":280,"wires":[["f6a3e59c.298908","c90a3369.ce513"],["f6a3e59c.298908"],["f6a3e59c.298908"],["d4fb94dc.f84d88"],["798835bb.cf0cc4"]]},{"id":"22d0b48e.bedf14","type":"server-state-changed","z":"9ab9f198.285b1","name":"Ext light override","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_select.exterior_light_schedule","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":160,"y":400,"wires":[["44fa7ef7.f4738"]]},{"id":"957c316.65f9a5","type":"api-current-state","z":"395a3554.de723a","name":"CJ Home?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.cjhome","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1170,"y":100,"wires":[["171fcb6d.ba8f9d"],[]]},{"id":"ca3c001f.c41f5","type":"api-current-state","z":"395a3554.de723a","name":"Jen Home?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.jenhome","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1170,"y":160,"wires":[["874ca11e.069208"],[]]},{"id":"ef20424e.51ab","type":"api-call-service","z":"9ab9f198.285b1","name":"Return to Auto","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_select","service":"select_option","entityId":"","data":"{\"entity_id\":\"input_select.exterior_light_schedule\",\"option\":\"Auto\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":700,"y":1340,"wires":[[]]},{"id":"5345270c.208c","type":"api-current-state","z":"9ab9f198.285b1","name":"Exterior Is it NOT Auto","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"Auto","halt_if_type":"str","halt_if_compare":"is_not","override_topic":false,"entity_id":"input_select.exterior_light_schedule","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":480,"y":1340,"wires":[["ef20424e.51ab"],[]]},{"id":"8ca1f8e7.aa5298","type":"inject","z":"9ab9f198.285b1","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"stop","payloadType":"str","x":190,"y":220,"wires":[["f6a3e59c.298908"]]},{"id":"5b9b7858.adcca","type":"switch","z":"5a64306a.6fec98","name":"Home/Away","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":290,"y":560,"wires":[["ac1c1d9c.e049e"],["15906abb.f6fcbd"]]},{"id":"7f938739.0fefe8","type":"switch","z":"5a64306a.6fec98","name":"Home/Away","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":290,"y":620,"wires":[["ac1c1d9c.e049e"],["2fd6c525.e0406a"]]},{"id":"f91db820.964808","type":"switch","z":"5a64306a.6fec98","name":"Home/Away","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":290,"y":720,"wires":[["ac1c1d9c.e049e"],["8d172939.4a0e88"]]},{"id":"deecaa1c.884128","type":"api-current-state","z":"5a64306a.6fec98","name":"Tori Home","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.jenhome","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":790,"y":640,"wires":[["f67ede1e.a8631"],[]]},{"id":"f67ede1e.a8631","type":"api-current-state","z":"5a64306a.6fec98","name":"Seb Home","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.jenhome","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":990,"y":640,"wires":[["78c7a910.298c08"],[]]},{"id":"d4fb94dc.f84d88","type":"function","z":"9ab9f198.285b1","name":"Manual (stop)","func":"switch (msg.payload){\n case \"Manual\":\n msg.payload = \"stop\";\n break;\n case \"Disabled\":\n msg.payload = \"stop\";\n break;\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":400,"y":300,"wires":[["f6a3e59c.298908"]]},{"id":"798835bb.cf0cc4","type":"function","z":"9ab9f198.285b1","name":"Disabled (stop)","func":"switch (msg.payload){\n case \"Disabled\":\n msg.payload = \"stop\";\n break;\n}\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":340,"wires":[["f6a3e59c.298908","c90a3369.ce513"]]},{"id":"408420ac.8200a","type":"inject","z":"9ab9f198.285b1","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Disabled","payloadType":"str","x":180,"y":340,"wires":[["798835bb.cf0cc4"]]},{"id":"962d5492.3a6e8","type":"api-current-state","z":"395a3554.de723a","name":"Get Alarm Time","server":"543e2171.45071","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"entity_id":"input_datetime.house_wakeup_time","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":580,"y":200,"wires":[["4e29220a.bf6de4"]]},{"id":"7c8da9be.0de7a","type":"inject","z":"395a3554.de723a","name":"","repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":60,"wires":[["9fa94015.fbbd78"]]},{"id":"9fa94015.fbbd78","type":"api-current-state","z":"395a3554.de723a","name":"House Alarm On?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.house_alarm_enable","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":350,"y":60,"wires":[["962d5492.3a6e8","7088eed.e42f89"],[]]},{"id":"7088eed.e42f89","type":"moment","z":"395a3554.de723a","name":"Current Time","topic":"","input":"","inputType":"msg","inTz":"America/Detroit","adjAmount":0,"adjType":"days","adjDir":"add","format":"H:mm","locale":"C","output":"","outputType":"msg","outTz":"America/Detroit","x":610,"y":60,"wires":[["d46721d3.0e4b78"]]},{"id":"4e29220a.bf6de4","type":"moment","z":"395a3554.de723a","name":"Alarm - Start time","topic":"","input":"","inputType":"msg","inTz":"America/Detroit","adjAmount":"10","adjType":"minutes","adjDir":"subtract","format":"H:mm","locale":"C","output":"","outputType":"msg","outTz":"America/Detroit","x":630,"y":120,"wires":[["d46721d3.0e4b78"]]},{"id":"d46721d3.0e4b78","type":"join","z":"395a3554.de723a","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":790,"y":80,"wires":[["999f3401.d3db38"]]},{"id":"999f3401.d3db38","type":"function","z":"395a3554.de723a","name":"Compare Times","func":"newmsg = {};\nif (msg.payload[0] == msg.payload[1]) {\n newmsg.payload = \"True\";\n} else {\n newmsg.payload = \"False\";\n}\n\nreturn newmsg;","outputs":1,"noerr":0,"x":960,"y":60,"wires":[["ae3f5040.603cb"]]},{"id":"ae3f5040.603cb","type":"switch","z":"395a3554.de723a","name":"Is it Time?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"True","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":970,"y":140,"wires":[["957c316.65f9a5","ca3c001f.c41f5"]]},{"id":"171fcb6d.ba8f9d","type":"api-call-service","z":"395a3554.de723a","name":"CJ - WakeUp","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.cj_alarm_running","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1350,"y":100,"wires":[["89d58c6d.d09c68"]]},{"id":"874ca11e.069208","type":"api-call-service","z":"395a3554.de723a","name":"Jen - WakeUp","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.jen_alarm_running","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1360,"y":160,"wires":[["89d58c6d.d09c68"]]},{"id":"9d45aa21.b0689","type":"api-call-service","z":"395a3554.de723a","name":"Turn off House alarm","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.house_alarm_enable","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1560,"y":240,"wires":[[]]},{"id":"89d58c6d.d09c68","type":"function","z":"395a3554.de723a","name":"Switch to off","func":"switch (msg.payload){\n case \"on\":\n msg.payload = \"off\";\n break;\n}\nreturn msg;","outputs":1,"noerr":0,"x":1550,"y":120,"wires":[["9d45aa21.b0689"]]},{"id":"8b47396.a62c448","type":"server-state-changed","z":"395a3554.de723a","name":"House Alarm Enabled","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.house_alarm_enable","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":120,"y":300,"wires":[["335309ad.599326","36b4cd3.ac76bb2"],[]]},{"id":"335309ad.599326","type":"api-call-service","z":"395a3554.de723a","name":"Turn off individual alarm (CJ)","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.cj_alarm_enable","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":460,"y":260,"wires":[[]]},{"id":"36b4cd3.ac76bb2","type":"api-call-service","z":"395a3554.de723a","name":"Turn off individual alarm (Jen)","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.jen_alarm_enable","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":470,"y":340,"wires":[[]]},{"id":"b2c44acc.9556b8","type":"bigtimer","z":"9ab9f198.285b1","outtopic":"","outpayload1":"on","outpayload2":"off","name":"Room NightLight Timer","comment":"Sleep time","lat":"42.64036","lon":"-83.13634","starttime":"1290","endtime":"5003","starttime2":0,"endtime2":0,"startoff":"-5","endoff":"-5","startoff2":0,"endoff2":0,"offs":0,"outtext1":"on","outtext2":"off","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":"","month7":"","day8":"","month8":"","day9":"","month9":"","day10":"","month10":"","day11":"","month11":"","day12":"","month12":"","d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":true,"atstart":false,"odd":false,"even":false,"x":700,"y":580,"wires":[["adf7012f.eae3f"],[],[]]},{"id":"adf7012f.eae3f","type":"switch","z":"9ab9f198.285b1","name":"Lights switch","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":910,"y":560,"wires":[["f82e3463.723ec8"],["61886145.b2632"]]},{"id":"797290cd.0a36a","type":"inject","z":"9ab9f198.285b1","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"on","payloadType":"str","x":190,"y":520,"wires":[["b2c44acc.9556b8"]]},{"id":"f1ffa9.e7162058","type":"inject","z":"9ab9f198.285b1","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"off","payloadType":"str","x":189.5,"y":554,"wires":[["b2c44acc.9556b8"]]},{"id":"771c6893.f3e378","type":"inject","z":"9ab9f198.285b1","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"auto","payloadType":"str","x":189.5,"y":588,"wires":[["b2c44acc.9556b8","42eeee1e.f30bf"]]},{"id":"f82e3463.723ec8","type":"api-current-state","z":"9ab9f198.285b1","name":"Tori home?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.torihome","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1090,"y":540,"wires":[["3b2fc169.0084ae"],["61886145.b2632"]]},{"id":"d3913712.99e3a8","type":"inject","z":"9ab9f198.285b1","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"stop","payloadType":"str","x":190,"y":620,"wires":[["b2c44acc.9556b8"]]},{"id":"4d4cfdff.5e9824","type":"bigtimer","z":"9ab9f198.285b1","outtopic":"","outpayload1":"Auto","outpayload2":"Auto","name":"Reset to Auto Timer","comment":"Dusk to Dawn timer","lat":"42.64036","lon":"-83.13634","starttime":"5004","endtime":"5003","starttime2":0,"endtime2":0,"startoff":"-5","endoff":"-5","startoff2":0,"endoff2":0,"offs":0,"outtext1":"Auto","outtext2":"Auto","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":"","month7":"","day8":"","month8":"","day9":"","month9":"","day10":"","month10":"","day11":"","month11":"","day12":"","month12":"","d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":false,"atstart":false,"odd":false,"even":false,"x":230,"y":1400,"wires":[["d1dbf69e.3b0a18","5345270c.208c","6e83395d.ae3bf8"],[],[]]},{"id":"d1dbf69e.3b0a18","type":"api-current-state","z":"9ab9f198.285b1","name":"General Is it NOT Auto","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"Auto","halt_if_type":"str","halt_if_compare":"is_not","override_topic":false,"entity_id":"input_select.nightlite_override","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":480,"y":1400,"wires":[["84b8f059.b60a7"],[]]},{"id":"5bd6bd8f.281a64","type":"switch","z":"9ab9f198.285b1","name":"Mode switch","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Auto","vt":"str"},{"t":"eq","v":"On","vt":"str"},{"t":"eq","v":"Off","vt":"str"},{"t":"eq","v":"Manual","vt":"str"},{"t":"eq","v":"Disabled","vt":"str"}],"checkall":"false","repair":false,"outputs":5,"x":170,"y":680,"wires":[["b2c44acc.9556b8","42eeee1e.f30bf"],["b2c44acc.9556b8"],["b2c44acc.9556b8"],["82795211.663ed"],["fc8a60a4.e0163"]]},{"id":"82795211.663ed","type":"function","z":"9ab9f198.285b1","name":"Manual (stop)","func":"switch (msg.payload){\n case \"Manual\":\n msg.payload = \"stop\";\n break;\n}\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":700,"wires":[["b2c44acc.9556b8"]]},{"id":"84b8f059.b60a7","type":"api-call-service","z":"9ab9f198.285b1","name":"Return to Auto","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_select","service":"select_option","entityId":"","data":"{\"entity_id\":\"input_select.nightlite_override\",\"option\":\"Auto\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":700,"y":1400,"wires":[[]]},{"id":"fc8a60a4.e0163","type":"function","z":"9ab9f198.285b1","name":"Disabled (stop)","func":"switch (msg.payload){\n case \"Disabled\":\n msg.payload = \"stop\";\n break;\n}\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":740,"wires":[["b2c44acc.9556b8","42eeee1e.f30bf"]]},{"id":"924a27d5.5ecbe8","type":"inject","z":"9ab9f198.285b1","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Disabled","payloadType":"str","x":180,"y":740,"wires":[["fc8a60a4.e0163"]]},{"id":"7e904f42.f3672","type":"api-call-service","z":"5a64306a.6fec98","name":"Turn off Eco","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"climate","service":"set_preset_mode","entityId":"","data":"{\"entity_id\":\"climate.hallway_thermostat\",\"preset_mode\":\"none\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":690,"y":1160,"wires":[["fd426b59.fd53f8"]]},{"id":"9a1785b.df57278","type":"api-current-state","z":"5a64306a.6fec98","name":"Vacation mode off?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.vacation","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":130,"y":1220,"wires":[["baea4597.c99218","6ed962fc.e22644"],[]]},{"id":"d3d4cb52.fe5a28","type":"api-call-service","z":"5a64306a.6fec98","name":"Set Eco","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"climate","service":"set_preset_mode","entityId":"","data":"{\"entity_id\":\"climate.hallway_thermostat\",\"preset_mode\":\"eco\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":680,"y":1100,"wires":[[]]},{"id":"a648ca93.7e5aa8","type":"server-state-changed","z":"5a64306a.6fec98","name":"Anybody Home?","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.occupied","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":440,"y":1100,"wires":[["d3d4cb52.fe5a28"],["7e904f42.f3672"]]},{"id":"633aa83d.1c4498","type":"switch","z":"5a64306a.6fec98","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"ON","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":90,"y":1180,"wires":[["9a1785b.df57278"]]},{"id":"222f0138.61e71e","type":"link in","z":"9ab9f198.285b1","name":"Receive Return to Auto","links":["42eeee1e.f30bf","f29a32ed.ee9cc","c90a3369.ce513","3f06f6cd.a8a89a","68d4d7d5.bbaad8","e15efb0e.fcfce8","d6146424.4a65e8","82e81d0d.f82c"],"x":95,"y":1400,"wires":[["4d4cfdff.5e9824"]]},{"id":"42eeee1e.f30bf","type":"link out","z":"9ab9f198.285b1","name":"Send to Return to Auto","links":["222f0138.61e71e","8d43aac2.e75b18"],"x":595,"y":660,"wires":[]},{"id":"c90a3369.ce513","type":"link out","z":"9ab9f198.285b1","name":"Send to Return to Auto","links":["222f0138.61e71e","8d43aac2.e75b18"],"x":595,"y":260,"wires":[]},{"id":"6e83395d.ae3bf8","type":"api-current-state","z":"9ab9f198.285b1","name":"Room Is it NOT Auto","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"Auto","halt_if_type":"str","halt_if_compare":"is_not","override_topic":false,"entity_id":"input_select.room_nightlite_override","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":480,"y":1460,"wires":[["82924ddf.e11a8"],[]]},{"id":"82924ddf.e11a8","type":"api-call-service","z":"9ab9f198.285b1","name":"Return to Auto","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_select","service":"select_option","entityId":"","data":"{\"entity_id\":\"input_select.room_nightlite_override\",\"option\":\"Auto\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":700,"y":1460,"wires":[[]]},{"id":"dd68f2e2.4db45","type":"server-state-changed","z":"9ab9f198.285b1","name":"Room nightlight override","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_select.room_nightlite_override","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":130,"y":800,"wires":[["5bd6bd8f.281a64"]]},{"id":"d2b46964.bd05c","type":"server-state-changed","z":"3d183616.022e8a","name":"Kitchen Motion","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.multisensor_motion","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":120,"y":100,"wires":[["b920dddd.1db4e","50eb48a3.c6c598"],[]]},{"id":"15ce389b.201127","type":"server-state-changed","z":"6a42a57e.13de6c","name":"HACS Updates","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":" sensor.hacs","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"1","halt_if_type":"num","halt_if_compare":"gte","outputs":2,"output_only_on_state_change":true,"x":140,"y":40,"wires":[["f85cc426.470148"],[]]},{"id":"1d4a69e0.f91d36","type":"server-state-changed","z":"6a42a57e.13de6c","name":"HA Updates","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.updater","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":130,"y":100,"wires":[["f85cc426.470148"],[]]},{"id":"3bae6663.82967a","type":"server-state-changed","z":"6a42a57e.13de6c","name":"Front Carriage light firmware update","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.shelly_shsw_pm_c45421","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":200,"y":160,"wires":[["c080203d.62b6d"]]},{"id":"757b3778.9586b8","type":"server-state-changed","z":"6a42a57e.13de6c","name":"Landing lights firmware update","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.shelly_shsw_1_55f0fe","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":210,"y":280,"wires":[["c080203d.62b6d"]]},{"id":"ae54d8ce.63e108","type":"server-state-changed","z":"6a42a57e.13de6c","name":"Side Carriage light firmware update","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.shelly_shsw_pm_c44770","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":200,"y":220,"wires":[["c080203d.62b6d"]]},{"id":"c080203d.62b6d","type":"switch","z":"6a42a57e.13de6c","name":"Has Update","property":"attributes.has_firmware_update","propertyType":"msg","rules":[{"t":"eq","v":"true","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":650,"y":400,"wires":[["f85cc426.470148"]]},{"id":"418e3b79.afafb4","type":"api-call-service","z":"6a42a57e.13de6c","name":"HA Notify","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"persistent_notification","service":"create","entityId":"","data":"{\"title\":\"Updates available\",\"message\":\"Updates to HA components are available. Please test first!\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1160,"y":180,"wires":[[]]},{"id":"59e2d4bd.a335fc","type":"link in","z":"6a42a57e.13de6c","name":"HA Notifications","links":["f85cc426.470148"],"x":1035,"y":180,"wires":[["418e3b79.afafb4"]]},{"id":"f85cc426.470148","type":"link out","z":"6a42a57e.13de6c","name":"Send Update Notifications","links":["59e2d4bd.a335fc"],"x":735,"y":80,"wires":[]},{"id":"dda55c28.b306e","type":"link in","z":"6a42a57e.13de6c","name":"Mobile Notificatons","links":[],"x":1035,"y":280,"wires":[["2e4484c6.1d415c"]]},{"id":"2e4484c6.1d415c","type":"e-mail","z":"6a42a57e.13de6c","server":"smtp.gmail.com","port":"465","secure":true,"tls":true,"name":"[email protected]","dname":"Home Assistant - Prod","x":1200,"y":280,"wires":[]},{"id":"31bac105.18f15e","type":"server-state-changed","z":"6a42a57e.13de6c","name":"Side Entry Shelly Update","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.shelly_shsw_1_55e7ad","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":230,"y":340,"wires":[["c080203d.62b6d"]]},{"id":"cc9deddd.a298c","type":"server-state-changed","z":"6a42a57e.13de6c","name":"Tori nightlight firmware update","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.shelly_shsw_1_93f489","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":220,"y":400,"wires":[["c080203d.62b6d"]]},{"id":"47715d84.954074","type":"server-state-changed","z":"9ab9f198.285b1","name":"Nightlight override","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_select.nightlite_override","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":150,"y":1160,"wires":[["62898308.a501fc"]]},{"id":"8276c494.248f38","type":"bigtimer","z":"9ab9f198.285b1","outtopic":"","outpayload1":"on","outpayload2":"off","name":"General Nightlight timer","comment":"Sleep time","lat":"42.64036","lon":"-83.13634","starttime":"1260","endtime":"5003","starttime2":0,"endtime2":0,"startoff":"-5","endoff":"10","startoff2":0,"endoff2":0,"offs":0,"outtext1":"on","outtext2":"off","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":"","month7":"","day8":"","month8":"","day9":"","month9":"","day10":"","month10":"","day11":"","month11":"","day12":"","month12":"","d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":true,"atstart":false,"odd":false,"even":false,"x":710,"y":980,"wires":[["c2f0d410.2b6e98"],[],[]]},{"id":"c2f0d410.2b6e98","type":"switch","z":"9ab9f198.285b1","name":"Lights switch","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":1010,"y":1040,"wires":[["d4f57d29.11a6"],["5904e3c7.2de50c"]]},{"id":"d4f57d29.11a6","type":"api-current-state","z":"9ab9f198.285b1","name":"Anyone home?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.occupied","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1240,"y":1000,"wires":[["36894402.a5bf3c"],["5904e3c7.2de50c","15fecdb8.a7fa12"]]},{"id":"ed94ebf7.34fed8","type":"inject","z":"9ab9f198.285b1","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"on","payloadType":"str","x":190,"y":920,"wires":[["8276c494.248f38"]]},{"id":"30c44614.1ad43a","type":"inject","z":"9ab9f198.285b1","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"off","payloadType":"str","x":189.5,"y":954,"wires":[["8276c494.248f38"]]},{"id":"cb3b1e2d.0c7fb","type":"inject","z":"9ab9f198.285b1","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"auto","payloadType":"str","x":189.5,"y":988,"wires":[["8276c494.248f38","68d4d7d5.bbaad8"]]},{"id":"2db12bad.6e6b84","type":"inject","z":"9ab9f198.285b1","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"stop","payloadType":"str","x":190,"y":1020,"wires":[["8276c494.248f38"]]},{"id":"62898308.a501fc","type":"switch","z":"9ab9f198.285b1","name":"Mode switch","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Auto","vt":"str"},{"t":"eq","v":"On","vt":"str"},{"t":"eq","v":"Off","vt":"str"},{"t":"eq","v":"Manual","vt":"str"},{"t":"eq","v":"Disabled","vt":"str"}],"checkall":"false","repair":false,"outputs":5,"x":170,"y":1080,"wires":[["8276c494.248f38","68d4d7d5.bbaad8"],["8276c494.248f38"],["8276c494.248f38"],["2c64bcc7.8c0304"],["ae2215c1.eff8c8"]]},{"id":"2c64bcc7.8c0304","type":"function","z":"9ab9f198.285b1","name":"Manual (stop)","func":"switch (msg.payload){\n case \"Manual\":\n msg.payload = \"stop\";\n break;\n}\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":1100,"wires":[["8276c494.248f38"]]},{"id":"ae2215c1.eff8c8","type":"function","z":"9ab9f198.285b1","name":"Disabled (stop)","func":"switch (msg.payload){\n case \"Disabled\":\n msg.payload = \"stop\";\n break;\n}\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":1140,"wires":[["8276c494.248f38","68d4d7d5.bbaad8"]]},{"id":"68d4d7d5.bbaad8","type":"link out","z":"9ab9f198.285b1","name":"Send to Return to Auto","links":["222f0138.61e71e","8d43aac2.e75b18"],"x":595,"y":1060,"wires":[]},{"id":"ad35d626.f43518","type":"comment","z":"9ab9f198.285b1","name":"General Nightlights","info":"","x":150,"y":880,"wires":[]},{"id":"540d2b57.8eb4c4","type":"comment","z":"9ab9f198.285b1","name":"Room Nightlights","info":"","x":160,"y":480,"wires":[]},{"id":"3d55d919.73e8a6","type":"comment","z":"9ab9f198.285b1","name":"Exterior Lights","info":"","x":170,"y":60,"wires":[]},{"id":"f3f71bc3.c6e128","type":"ha-get-entities","z":"d78a1efb.7cd88","server":"543e2171.45071","name":"","rules":[{"property":"entity_id","logic":"is","value":"topic","valueType":"msg"}],"output_type":"array","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":180,"y":60,"wires":[["8267e0c1.6ad97"]]},{"id":"8267e0c1.6ad97","type":"split","z":"d78a1efb.7cd88","name":"","splt":"","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":350,"y":60,"wires":[["1dffed1d.dedd43"]]},{"id":"1dffed1d.dedd43","type":"api-current-state","z":"d78a1efb.7cd88","name":"light is on","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"{{ payload.entity_id }}","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":500,"y":60,"wires":[["b5fe7455.166e08"],[]]},{"id":"b5fe7455.166e08","type":"api-call-service","z":"d78a1efb.7cd88","name":"light_turn_off","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"{{ payload.entity_id }}","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":710,"y":60,"wires":[[]]},{"id":"b920dddd.1db4e","type":"api-current-state","z":"3d183616.022e8a","name":"Motion Enabled?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.nightlight_motion_enabled","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":330,"y":100,"wires":[["da960409.d6c4b","7a41b7bb.13778"],[]]},{"id":"36894402.a5bf3c","type":"api-call-service","z":"9ab9f198.285b1","name":"Nightlight Motion Enabled","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.nightlight_motion_enabled","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1550,"y":980,"wires":[[]]},{"id":"5904e3c7.2de50c","type":"api-call-service","z":"9ab9f198.285b1","name":"Nightlight Motion Disabled","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.nightlight_motion_enabled","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1550,"y":1040,"wires":[[]]},{"id":"ba566423.14c0a8","type":"api-call-service","z":"3d183616.022e8a","name":"Turn Off","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.shelly1_c4fdf1","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1100,"y":120,"wires":[[]]},{"id":"61886145.b2632","type":"api-call-service","z":"9ab9f198.285b1","name":"Turn nightlight off","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.shelly1_93f489","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1330,"y":600,"wires":[[]]},{"id":"3b2fc169.0084ae","type":"api-call-service","z":"9ab9f198.285b1","name":"Turn nightlight on","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.shelly1_93f489","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1330,"y":540,"wires":[[]]},{"id":"5ec15038.18774","type":"function","z":"9ab9f198.285b1","name":"Initialize Brightness","func":"flow.set(\"brightness\", 50);\n\nnewmsg = {\"payload\":\"true\"}\nreturn newmsg;","outputs":1,"noerr":0,"x":410,"y":820,"wires":[[]]},{"id":"da84a359.da616","type":"api-call-service","z":"3d183616.022e8a","name":"Turn on","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.shelly1_c4fdf1","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1100,"y":60,"wires":[[]]},{"id":"eed9daae.5e4cb8","type":"switch","z":"6a42a57e.13de6c","name":"ON only","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"ON","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":560,"y":880,"wires":[["46c0878e.c80a08","4bee91da.c75c8"]]},{"id":"46c0878e.c80a08","type":"delay","z":"6a42a57e.13de6c","name":"","pauseType":"delay","timeout":"120","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":770,"y":840,"wires":[["e027e090.9dab7"]]},{"id":"e027e090.9dab7","type":"api-call-service","z":"6a42a57e.13de6c","name":"hassio","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"hassio","service":"addon_stdin","entityId":"","data":"{\"addon\":\"7be23ff5_dropbox_sync\",\"input\":{\"command\":\"upload\"}}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":950,"y":840,"wires":[[]]},{"id":"4bee91da.c75c8","type":"api-call-service","z":"6a42a57e.13de6c","name":"Snapshot","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"hassio","service":"snapshot_full","entityId":"","data":"{}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":960,"y":900,"wires":[[]]},{"id":"79fb55a4.eae6dc","type":"rbe","z":"6a42a57e.13de6c","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":410,"y":880,"wires":[["eed9daae.5e4cb8"]]},{"id":"ca1179f0.3f37b8","type":"inject","z":"6a42a57e.13de6c","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"ON","payloadType":"str","x":270,"y":820,"wires":[["79fb55a4.eae6dc"]]},{"id":"5e226bdc.321a24","type":"server-state-changed","z":"6a42a57e.13de6c","name":"Manual trigger backup","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.backup_trigger","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":220,"y":1000,"wires":[["e5bde6e3.37bf98"],[]]},{"id":"e5bde6e3.37bf98","type":"change","z":"6a42a57e.13de6c","name":"Format ON","rules":[{"t":"set","p":"payload","pt":"msg","to":"ON","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":250,"y":940,"wires":[["79fb55a4.eae6dc","34913f1e.e94e6"]]},{"id":"34913f1e.e94e6","type":"delay","z":"6a42a57e.13de6c","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":500,"y":1000,"wires":[["d7231e0c.483bb"]]},{"id":"d7231e0c.483bb","type":"api-call-service","z":"6a42a57e.13de6c","name":"","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.backup_trigger","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":730,"y":1000,"wires":[[]]},{"id":"fd7fcc3d.9db9b","type":"server-state-changed","z":"6a42a57e.13de6c","name":"Manual trigger sync","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.dropbox_trigger","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":750,"y":780,"wires":[["e027e090.9dab7","10b2d880.9a1b98"],[]]},{"id":"bcc682d.5a79d8","type":"server-state-changed","z":"6a42a57e.13de6c","name":"Node-Red-WD","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.node_red","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":200,"y":1120,"wires":[["1310c5a9.a2d50a"]]},{"id":"1310c5a9.a2d50a","type":"change","z":"6a42a57e.13de6c","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"OK","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":1120,"wires":[["99f55302.b9f08"]]},{"id":"99f55302.b9f08","type":"mqtt out","z":"6a42a57e.13de6c","name":"Checkin MQTT","topic":"checkin/nodered","qos":"0","retain":"false","broker":"19f2fec8.28ebf1","x":720,"y":1120,"wires":[]},{"id":"8b178604.599468","type":"api-call-service","z":"6a42a57e.13de6c","name":"Toggle Node-Red Watchdog","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"toggle","entityId":"input_boolean.node_red","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":480,"y":1060,"wires":[[]]},{"id":"5e7dad82.53d834","type":"api-call-service","z":"5a64306a.6fec98","name":"Seb Home","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.sebhome","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":310,"y":460,"wires":[[]]},{"id":"d3111dd3.9880d","type":"api-call-service","z":"5a64306a.6fec98","name":"Jen Home","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.jenhome","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":310,"y":220,"wires":[[]]},{"id":"8dfe236.7570ae","type":"api-call-service","z":"5a64306a.6fec98","name":"Turn on entry light","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.shelly1_55e7ad","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1210,"y":420,"wires":[["90f168bc.244448"]]},{"id":"89da455e.012b18","type":"time-range-switch","z":"5a64306a.6fec98","name":"Dark Hours?","lat":"42.64036","lon":"-83.13634","startTime":"sunsetStart","endTime":"dawn","startOffset":"-10","endOffset":0,"x":1050,"y":480,"wires":[["8dfe236.7570ae"],["bb7071b.56a639"]]},{"id":"bb7071b.56a639","type":"api-call-service","z":"5a64306a.6fec98","name":"Turn off entry light","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.shelly1_55e7ad","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1430,"y":540,"wires":[[]]},{"id":"647aefa7.4eeb2","type":"api-current-state","z":"5a64306a.6fec98","name":"Is Side Entry ON?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"entity_id":"switch.shelly1_55e7ad","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1430,"y":480,"wires":[["bb7071b.56a639"],[]]},{"id":"e4e74689.7b1328","type":"server-state-changed","z":"5a64306a.6fec98","name":"Home/Away","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.occupied","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":870,"y":520,"wires":[["89da455e.012b18"],["bb7071b.56a639"]]},{"id":"db47e890.1cb178","type":"server-state-changed","z":"9ab9f198.285b1","name":"Exterior Light Display","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.exterior_light_display","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":760,"y":240,"wires":[[],[]]},{"id":"773fee9e.67818","type":"bigtimer","z":"9eeb0d55.a72a4","outtopic":"","outpayload1":"Christmas","outpayload2":"","name":"Xmas time","comment":"","lat":"42.64036","lon":"-83.13634","starttime":"15","endtime":"1425","starttime2":"1425","endtime2":"15","startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"Christmas","outtext2":"","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":false,"feb":false,"mar":false,"apr":false,"may":false,"jun":false,"jul":false,"aug":false,"sep":false,"oct":false,"nov":false,"dec":true,"day1":"20","month1":"11","day2":"21","month2":"11","day3":"22","month3":"11","day4":"23","month4":"11","day5":"24","month5":"11","day6":"25","month6":"11","day7":"26","month7":"11","day8":"27","month8":"11","day9":"28","month9":"11","day10":"29","month10":"11","day11":"30","month11":"11","day12":"1","month12":"1","d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":150,"y":260,"wires":[["7eb1d91d.a216c8"],[],[]]},{"id":"76918f3f.139e7","type":"bigtimer","z":"9eeb0d55.a72a4","outtopic":"","outpayload1":"Halloween","outpayload2":"","name":"Halloween time","comment":"","lat":"42.64036","lon":"-83.13634","starttime":"15","endtime":1425,"starttime2":"1425","endtime2":"15","startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"Halloween","outtext2":"","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":false,"feb":false,"mar":false,"apr":false,"may":false,"jun":false,"jul":false,"aug":false,"sep":false,"oct":false,"nov":false,"dec":false,"day1":"26","month1":"10","day2":"27","month2":"10","day3":"28","month3":"10","day4":"29","month4":"10","day5":"30","month5":"10","day6":"31","month6":"10","day7":"","month7":"","day8":"","month8":0,"day9":"","month9":0,"day10":"","month10":0,"day11":"","month11":0,"day12":"","month12":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":140,"y":180,"wires":[["7eb1d91d.a216c8"],[],[]]},{"id":"2168b242.6c3d9e","type":"bigtimer","z":"9eeb0d55.a72a4","outtopic":"","outpayload1":"General","outpayload2":"","name":"General time","comment":"","lat":"42.64036","lon":"-83.13634","starttime":"15","endtime":1425,"starttime2":"1425","endtime2":"15","startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"General","outtext2":"","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":false,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":false,"dec":false,"day1":"","month1":0,"day2":"","month2":0,"day3":"","month3":0,"day4":"","month4":0,"day5":"","month5":0,"day6":"","month6":0,"day7":"","month7":0,"day8":"","month8":0,"day9":"","month9":0,"day10":"","month10":0,"day11":"","month11":0,"day12":"","month12":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":"0","xmonth1":"0","xday2":"0","xmonth2":"0","xday3":"0","xmonth3":"0","xday4":"0","xmonth4":"0","xday5":"0","xmonth5":"0","xday6":"0","xmonth6":"0","xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":150,"y":340,"wires":[["7eb1d91d.a216c8"],[],[]]},{"id":"7eb1d91d.a216c8","type":"switch","z":"9eeb0d55.a72a4","name":"Ext. Light mode","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Christmas","vt":"str"},{"t":"eq","v":"Halloween","vt":"str"},{"t":"eq","v":"General","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":480,"y":140,"wires":[["f5869325.cd653"],["71db98b7.0073b8"],["d5da00a3.38b8"]]},{"id":"df822088.59d4e","type":"inject","z":"9eeb0d55.a72a4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Christmas","payloadType":"str","x":160,"y":80,"wires":[["7eb1d91d.a216c8"]]},{"id":"b803ec32.a8862","type":"inject","z":"9eeb0d55.a72a4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Halloween","payloadType":"str","x":160,"y":40,"wires":[["7eb1d91d.a216c8"]]},{"id":"df643971.ec2808","type":"inject","z":"9eeb0d55.a72a4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"General","payloadType":"str","x":170,"y":120,"wires":[["7eb1d91d.a216c8"]]},{"id":"f5869325.cd653","type":"api-current-state","z":"9eeb0d55.a72a4","name":"Exterior Display Is it NOT Xmas","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"Christmas","halt_if_type":"str","halt_if_compare":"is_not","override_topic":false,"entity_id":"input_select.exterior_lights_mode","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":750,"y":80,"wires":[["f5bbaca3.7f115"],[]]},{"id":"71db98b7.0073b8","type":"api-current-state","z":"9eeb0d55.a72a4","name":"Exterior Display Is it NOT Halloween","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"Halloween","halt_if_type":"str","halt_if_compare":"is_not","override_topic":false,"entity_id":"input_select.exterior_lights_mode","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":770,"y":140,"wires":[["951e256b.6a1498"],[]]},{"id":"d5da00a3.38b8","type":"api-current-state","z":"9eeb0d55.a72a4","name":"Exterior Display Is it NOT General","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"General","halt_if_type":"str","halt_if_compare":"is_not","override_topic":false,"entity_id":"input_select.exterior_lights_mode","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":760,"y":200,"wires":[["d9402d73.f1e96"],[]]},{"id":"f5bbaca3.7f115","type":"api-call-service","z":"9eeb0d55.a72a4","name":"Set for Xmas","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_select","service":"select_option","entityId":"","data":"{\"entity_id\":\"input_select.exterior_lights_mode\",\"option\":\"Christmas\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1030,"y":80,"wires":[[]]},{"id":"951e256b.6a1498","type":"api-call-service","z":"9eeb0d55.a72a4","name":"Set for Halloween","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_select","service":"select_option","entityId":"","data":"{\"entity_id\":\"input_select.exterior_lights_mode\",\"option\":\"Halloween\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1050,"y":140,"wires":[[]]},{"id":"d9402d73.f1e96","type":"api-call-service","z":"9eeb0d55.a72a4","name":"Set for General","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_select","service":"select_option","entityId":"","data":"{\"entity_id\":\"input_select.exterior_lights_mode\",\"option\":\"General\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1040,"y":200,"wires":[[]]},{"id":"4526ff25.55d2","type":"bigtimer","z":"9eeb0d55.a72a4","outtopic":"","outpayload1":"General","outpayload2":"","name":"General time (Jan)","comment":"","lat":"42.64036","lon":"-83.13634","starttime":"15","endtime":1425,"starttime2":"1425","endtime2":"15","startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"General","outtext2":"","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":false,"mar":false,"apr":false,"may":false,"jun":false,"jul":false,"aug":false,"sep":false,"oct":false,"nov":false,"dec":false,"day1":"11","month1":"11","day2":"12","month2":"11","day3":"13","month3":"11","day4":"14","month4":"11","day5":"15","month5":"11","day6":"16","month6":"11","day7":"17","month7":"11","day8":"18","month8":"11","day9":"19","month9":"11","day10":"","month10":0,"day11":"","month11":0,"day12":"","month12":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":"1","xmonth1":"1","xday2":"2","xmonth2":"1","xday3":"","xmonth3":"","xday4":"","xmonth4":"","xday5":"","xmonth5":"","xday6":"","xmonth6":"","xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":130,"y":500,"wires":[["7eb1d91d.a216c8"],[],[]]},{"id":"2bc52da6.dc1162","type":"bigtimer","z":"9eeb0d55.a72a4","outtopic":"","outpayload1":"General","outpayload2":"","name":"General time (Oct)","comment":"","lat":"42.64036","lon":"-83.13634","starttime":"15","endtime":1425,"starttime2":"1425","endtime2":"15","startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"General","outtext2":"","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":false,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":false,"dec":false,"day1":"1","month1":"11","day2":"2","month2":"11","day3":"3","month3":"11","day4":"4","month4":"11","day5":"5","month5":"11","day6":"6","month6":"11","day7":"7","month7":"11","day8":"8","month8":"11","day9":"9","month9":"11","day10":"10","month10":"11","day11":"","month11":0,"day12":"","month12":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":"0","xmonth1":"0","xday2":"0","xmonth2":"0","xday3":"0","xmonth3":"0","xday4":"0","xmonth4":"0","xday5":"0","xmonth5":"0","xday6":"0","xmonth6":"0","xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":130,"y":420,"wires":[["7eb1d91d.a216c8"],[],[]]},{"id":"dce1b28c.a8504","type":"api-call-service","z":"9eeb0d55.a72a4","name":"Set Exterior lights to manual","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_select","service":"select_option","entityId":"","data":"{\"entity_id\":\"input_select.exterior_light_schedule\",\"option\":\"Manual\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1360,"y":320,"wires":[[]]},{"id":"213585d4.e810ea","type":"api-call-service","z":"9eeb0d55.a72a4","name":"Turn on Exterior light display","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.exterior_light_display","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1360,"y":260,"wires":[[]]},{"id":"bab5edf8.cbeea","type":"api-call-service","z":"9eeb0d55.a72a4","name":"Turn off Exterior light display","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.exterior_light_display","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1360,"y":440,"wires":[[]]},{"id":"2ff92ead.facab2","type":"bigtimer","z":"9eeb0d55.a72a4","outtopic":"","outpayload1":"on","outpayload2":"off","name":"Lighting display timer","comment":"","lat":"42.64036","lon":"-83.13634","starttime":"5004","endtime":"60","starttime2":0,"endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"on","outtext2":"off","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":0,"month7":0,"day8":0,"month8":0,"day9":0,"month9":0,"day10":0,"month10":0,"day11":0,"month11":0,"day12":0,"month12":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":700,"y":420,"wires":[["712d4db3.994184"],[],[]]},{"id":"546dc2fe.53a6ac","type":"api-current-state","z":"9eeb0d55.a72a4","name":"Ext light display mode","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"General","halt_if_type":"str","halt_if_compare":"is_not","override_topic":false,"entity_id":"input_select.exterior_lights_mode","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1080,"y":340,"wires":[["213585d4.e810ea"],[]]},{"id":"1d7e3e92.55d1c1","type":"server-state-changed","z":"9eeb0d55.a72a4","name":"Enable lighting display","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.exterior_light_display","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":140,"y":760,"wires":[["4f3a806f.80b63"]]},{"id":"577fb5b.fe84e4c","type":"inject","z":"9eeb0d55.a72a4","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"on","payloadType":"str","x":490,"y":360,"wires":[["2ff92ead.facab2"]]},{"id":"2e47b9f3.736da6","type":"inject","z":"9eeb0d55.a72a4","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"off","payloadType":"str","x":490,"y":400,"wires":[["2ff92ead.facab2"]]},{"id":"bd3ca42.bb67258","type":"inject","z":"9eeb0d55.a72a4","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"auto","payloadType":"str","x":490,"y":440,"wires":[["2ff92ead.facab2"]]},{"id":"ac338113.a38d5","type":"inject","z":"9eeb0d55.a72a4","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"stop","payloadType":"str","x":490,"y":480,"wires":[["2ff92ead.facab2"]]},{"id":"712d4db3.994184","type":"switch","z":"9eeb0d55.a72a4","name":"traffic","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":890,"y":400,"wires":[["546dc2fe.53a6ac"],["bab5edf8.cbeea"]]},{"id":"e30c4183.d845e","type":"server-state-changed","z":"9eeb0d55.a72a4","name":"Switched to manual","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_select.exterior_light_schedule","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"Manual","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":130,"y":580,"wires":[["86b7786b.524978"],[]]},{"id":"86b7786b.524978","type":"api-current-state","z":"9eeb0d55.a72a4","name":"Ext light display mode","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"General","halt_if_type":"str","halt_if_compare":"is_not","override_topic":true,"entity_id":"input_select.exterior_lights_mode","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":380,"y":560,"wires":[["c452d57f.30dbd8"],[]]},{"id":"c452d57f.30dbd8","type":"switch","z":"9eeb0d55.a72a4","name":"traffic","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Christmas","vt":"str"},{"t":"eq","v":"Halloween","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":610,"y":560,"wires":[["ba148cc6.10ea2","7211812.254be8","c0a3363.73e81c8"],[]]},{"id":"76b5a076.fd952","type":"api-call-service","z":"9eeb0d55.a72a4","name":"Turn on Light display","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.shelly1_c42687","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":560,"y":660,"wires":[[]]},{"id":"3d70a25f.90e60e","type":"api-call-service","z":"9eeb0d55.a72a4","name":"Turn off Light display","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.shelly1_c42687","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":560,"y":800,"wires":[[]]},{"id":"4f3a806f.80b63","type":"switch","z":"9eeb0d55.a72a4","name":"traffic","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":350,"y":760,"wires":[["76b5a076.fd952","bdc3092e.01a8e"],["3d70a25f.90e60e","630d66bc.7a1148"]]},{"id":"8f43c614.ef2158","type":"api-call-service","z":"6006f1f.70c981","name":"Add HVAC runtime","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_number","service":"set_value","entityId":"input_number.hvac_runtime","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1130,"y":180,"wires":[[]]},{"id":"bc8de10e.621ee","type":"inject","z":"6006f1f.70c981","name":"Store HVAC runtime trigger","props":[{"p":"payload"}],"repeat":"","crontab":"01 12 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":60,"wires":[["649fe64c.e088a8","1d96b77d.04b799","9ac69b1.ae5c468"]]},{"id":"9ac69b1.ae5c468","type":"api-current-state","z":"6006f1f.70c981","name":"Get current filter runtime","server":"543e2171.45071","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"entity_id":"input_number.hvac_runtime","state_type":"num","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":490,"y":60,"wires":[["d4210899.a00c08"]]},{"id":"649fe64c.e088a8","type":"api-current-state","z":"6006f1f.70c981","name":"Get Cooling time yesterday","server":"543e2171.45071","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"entity_id":"sensor.cooling_time_yesterday","state_type":"num","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":500,"y":120,"wires":[["94d35f7.1e0d4a"]]},{"id":"1d96b77d.04b799","type":"api-current-state","z":"6006f1f.70c981","name":"Get Heating time yesterday","server":"543e2171.45071","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"entity_id":"sensor.heating_time_yesterday","state_type":"num","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":500,"y":180,"wires":[["1a05d2b.b293a2d"]]},{"id":"9db738a5.957e88","type":"join","z":"6006f1f.70c981","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"num","reduceFixup":"","x":950,"y":60,"wires":[["66a77add.2d8564"]]},{"id":"94d35f7.1e0d4a","type":"change","z":"6006f1f.70c981","name":"","rules":[{"t":"set","p":"parts","pt":"msg","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":740,"y":120,"wires":[["9db738a5.957e88"]]},{"id":"1a05d2b.b293a2d","type":"change","z":"6006f1f.70c981","name":"","rules":[{"t":"set","p":"parts","pt":"msg","to":"2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":740,"y":180,"wires":[["9db738a5.957e88"]]},{"id":"66a77add.2d8564","type":"change","z":"6006f1f.70c981","name":"$sum(payload)","rules":[{"t":"set","p":"payload","pt":"msg","to":"$sum(payload)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1120,"y":60,"wires":[["2bff69dd.81db86"]]},{"id":"d4210899.a00c08","type":"change","z":"6006f1f.70c981","name":"","rules":[{"t":"set","p":"parts","pt":"msg","to":"1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":740,"y":60,"wires":[["9db738a5.957e88"]]},{"id":"2bff69dd.81db86","type":"function","z":"6006f1f.70c981","name":"","func":"const origValue = msg.payload;\nconst newValue = origValue.toFixed(1);\n\nmsg.payload = { \n \"data\": { \n value: newValue\n }\n}\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1100,"y":120,"wires":[["8f43c614.ef2158"]]},{"id":"8a982ba2.d6d2f8","type":"server-state-changed","z":"6006f1f.70c981","name":"Change furnace filter","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.change_filter","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":130,"y":300,"wires":[["ecf8234b.47953","600a6108.a1751","ea49f5d4.b361c8"],[]]},{"id":"fd9d97cf.07cda8","type":"api-call-service","z":"6006f1f.70c981","name":"Set Furnace filter change date","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_text","service":"set_value","entityId":"input_text.furnace_filter","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1110,"y":360,"wires":[[]]},{"id":"ecf8234b.47953","type":"api-call-service","z":"6006f1f.70c981","name":"Reset HVAC runtime","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_number","service":"set_value","entityId":"","data":"{\"entity_id\":\"input_number.hvac_runtime\",\"value\":\"0\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":480,"y":300,"wires":[[]]},{"id":"39a4b54c.e9e4ba","type":"moment","z":"6006f1f.70c981","name":"","topic":"","input":"","inputType":"msg","inTz":"America/Detroit","adjAmount":0,"adjType":"days","adjDir":"add","format":"","locale":"C","output":"","outputType":"msg","outTz":"America/Detroit","x":680,"y":360,"wires":[["41e82f8a.3cbf"]]},{"id":"41e82f8a.3cbf","type":"function","z":"6006f1f.70c981","name":"","func":"const newValue = msg.payload;\n\nmsg.payload = { \n \"data\": { \n value: newValue\n }\n}\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":880,"y":360,"wires":[["fd9d97cf.07cda8"]]},{"id":"600a6108.a1751","type":"delay","z":"6006f1f.70c981","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":440,"y":420,"wires":[["9251e6bc.690298"]]},{"id":"9251e6bc.690298","type":"api-call-service","z":"6006f1f.70c981","name":"Reset","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.change_filter","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":580,"y":420,"wires":[[]]},{"id":"ea49f5d4.b361c8","type":"trigger","z":"6006f1f.70c981","name":"","op1":"","op2":"0","op1type":"date","op2type":"str","duration":"250","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":2,"x":460,"y":360,"wires":[["39a4b54c.e9e4ba"],[]]},{"id":"bf7a1170.6719e","type":"inject","z":"395a3554.de723a","name":"AutoEnable Alarm(s) - Late Night (AM)","repeat":"","crontab":"*/1 0-2 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"on","payloadType":"str","x":200,"y":740,"wires":[["fe3ca3a3.8b9e5"]]},{"id":"90824873.9c3448","type":"api-current-state","z":"395a3554.de723a","name":"CJ-AutoEnable (Weekdays)","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"Weekdays","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_select.cj_alarm_autoenable","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":780,"y":460,"wires":[["10904888.d63357"],[]]},{"id":"1edad2e1.a941cd","type":"api-call-service","z":"395a3554.de723a","name":"CJ-Alarm-On","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.cj_alarm_enable","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1270,"y":520,"wires":[[]]},{"id":"3fe875be.dd009a","type":"api-current-state","z":"395a3554.de723a","name":"CJ-AutoEnable (Weekends)","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"Weekends","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_select.cj_alarm_autoenable","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":780,"y":520,"wires":[["10904888.d63357"],[]]},{"id":"fcfbf1bb.9590f","type":"api-current-state","z":"395a3554.de723a","name":"Jen-AutoEnable (Weekdays)","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"Weekdays","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_select.jen_alarm_autoenable","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":780,"y":640,"wires":[["4f0fca32.234894"],[]]},{"id":"144585af.987aaa","type":"api-current-state","z":"395a3554.de723a","name":"Jen-AutoEnable (Weekends)","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"Weekends","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_select.jen_alarm_autoenable","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":780,"y":700,"wires":[["4f0fca32.234894"],[]]},{"id":"4726855f.e9e39c","type":"api-call-service","z":"395a3554.de723a","name":"Jen-Alarm-On","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.jen_alarm_enable","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1280,"y":700,"wires":[[]]},{"id":"10904888.d63357","type":"api-current-state","z":"395a3554.de723a","name":"CJ Home?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.cjhome","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1070,"y":520,"wires":[["1edad2e1.a941cd"],[]]},{"id":"4f0fca32.234894","type":"api-current-state","z":"395a3554.de723a","name":"Jen Home?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.jenhome","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1070,"y":700,"wires":[["4726855f.e9e39c"],[]]},{"id":"e999836c.22c28","type":"inject","z":"395a3554.de723a","name":"AutoEnable Alarm(s) - Late Night (PM)","repeat":"","crontab":"*/1 21-23 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"on","payloadType":"str","x":200,"y":460,"wires":[["fe3ca3a3.8b9e5"]]},{"id":"1ccda375.9aa50d","type":"api-current-state","z":"395a3554.de723a","name":"CJ-AutoEnable (Both)","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"Both","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_select.cj_alarm_autoenable","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":760,"y":580,"wires":[["10904888.d63357"],[]]},{"id":"8379d4ec.d7a2d8","type":"api-current-state","z":"395a3554.de723a","name":"Jen-AutoEnable (Both)","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"Both","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_select.jen_alarm_autoenable","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":770,"y":760,"wires":[["4f0fca32.234894"],[]]},{"id":"9e17f346.779a8","type":"api-call-service","z":"3413a3a8.0b47ec","name":"Set Day","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_select","service":"select_option","entityId":"","data":"{\"entity_id\":\"input_select.house_mode\",\"option\":\"Day\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":500,"y":100,"wires":[[]]},{"id":"7c6d5534.c7d06c","type":"api-call-service","z":"3413a3a8.0b47ec","name":"Set Afternoon","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_select","service":"select_option","entityId":"","data":"{\"entity_id\":\"input_select.house_mode\",\"option\":\"Afternoon\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":520,"y":180,"wires":[[]]},{"id":"f3232e22.c0cfb","type":"api-call-service","z":"3413a3a8.0b47ec","name":"Set Night","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_select","service":"select_option","entityId":"","data":"{\"entity_id\":\"input_select.house_mode\",\"option\":\"Night\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":500,"y":340,"wires":[[]]},{"id":"ba4f8d45.9eb9b","type":"api-call-service","z":"3413a3a8.0b47ec","name":"Set Evening","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_select","service":"select_option","entityId":"","data":"{\"entity_id\":\"input_select.house_mode\",\"option\":\"Evening\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":510,"y":260,"wires":[[]]},{"id":"91bfc052.dbfb4","type":"comment","z":"395a3554.de723a","name":"General Wake Up","info":"","x":90,"y":20,"wires":[]},{"id":"e96fa676.564968","type":"comment","z":"395a3554.de723a","name":"CJ Wake Up","info":"","x":70,"y":880,"wires":[]},{"id":"2641ba55.23d056","type":"moment","z":"395a3554.de723a","name":"Current Time","topic":"","input":"","inputType":"msg","inTz":"America/Detroit","adjAmount":0,"adjType":"days","adjDir":"add","format":"H:mm","locale":"C","output":"","outputType":"msg","outTz":"America/Detroit","x":710,"y":960,"wires":[["ab2a56a1.d1eec8"]]},{"id":"18fc5a7b.6fbdb6","type":"moment","z":"395a3554.de723a","name":"Alarm - Start time","topic":"","input":"","inputType":"msg","inTz":"America/Detroit","adjAmount":"10","adjType":"minutes","adjDir":"subtract","format":"H:mm","locale":"C","output":"","outputType":"msg","outTz":"America/Detroit","x":730,"y":1000,"wires":[["ab2a56a1.d1eec8"]]},{"id":"e368fdbb.c69c9","type":"api-current-state","z":"395a3554.de723a","name":"Get Alarm Time","server":"543e2171.45071","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"entity_id":"input_datetime.cj_wakeup_time","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":720,"y":1040,"wires":[["18fc5a7b.6fbdb6"]]},{"id":"ab2a56a1.d1eec8","type":"join","z":"395a3554.de723a","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":950,"y":960,"wires":[["ae180fcd.06e9a"]]},{"id":"ae180fcd.06e9a","type":"function","z":"395a3554.de723a","name":"Compare Times","func":"newmsg = {};\nif (msg.payload[0] == msg.payload[1]) {\n newmsg.payload = \"True\";\n} else {\n newmsg.payload = \"False\";\n}\n\nreturn newmsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":980,"y":1000,"wires":[["ddb5a1b1.323f3"]]},{"id":"ddb5a1b1.323f3","type":"switch","z":"395a3554.de723a","name":"Is it Time?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"True","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":970,"y":1040,"wires":[["f5f234c1.6de0c8"]]},{"id":"2f028f4c.ddae6","type":"comment","z":"395a3554.de723a","name":"TRIGGER WAKE UP","info":"","x":120,"y":920,"wires":[]},{"id":"ba62ae9c.8db5a","type":"inject","z":"395a3554.de723a","name":"","repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":960,"wires":[["2f213975.538336"]]},{"id":"2f213975.538336","type":"api-current-state","z":"395a3554.de723a","name":"Alarm Clock ON?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.cj_alarm_enable","state_type":"str","state_location":"","override_payload":"none","entity_location":"","override_data":"none","blockInputOverrides":false,"x":370,"y":960,"wires":[["2641ba55.23d056","e368fdbb.c69c9"],[]]},{"id":"f5f234c1.6de0c8","type":"api-call-service","z":"395a3554.de723a","name":"CJ - WakeUp","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.cj_alarm_running","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1190,"y":1040,"wires":[[]]},{"id":"1f10a58c.687a2a","type":"server-state-changed","z":"395a3554.de723a","name":"Wake CJ","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.cj_alarm_running","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"x":120,"y":1280,"wires":[["52ac9371.4a41fc","c2d83bcc.8aa03"],[]]},{"id":"52ac9371.4a41fc","type":"switch","z":"395a3554.de723a","name":"Is it Time?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":330,"y":1280,"wires":[["4650bc18.930784","a5833a48.212f38"]]},{"id":"4650bc18.930784","type":"function","z":"395a3554.de723a","name":"Initialize Brightness/Volume","func":"flow.set(\"brightness\", 1);\nflow.set(\"volume\", 0);\n\nnewmsg = {\"payload\":\"true\"}\nreturn newmsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":620,"y":1280,"wires":[[]]},{"id":"fcd46bd0.53c948","type":"inject","z":"395a3554.de723a","name":"","repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":850,"y":1280,"wires":[["4650bc18.930784"]]},{"id":"7ab44b80.e6ce24","type":"server-state-changed","z":"395a3554.de723a","name":"Snooze Off","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.cj_alarm_snooze","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"x":340,"y":1360,"wires":[["a5833a48.212f38"],[]]},{"id":"a5833a48.212f38","type":"change","z":"395a3554.de723a","name":"Start","rules":[{"t":"set","p":"payload","pt":"msg","to":"start","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":1360,"wires":[["e90e3c6c.8935f"]]},{"id":"e90e3c6c.8935f","type":"traffic","z":"395a3554.de723a","name":"Brighten the Lights","property_allow":"payload","filter_allow":"start","ignore_case_allow":false,"negate_allow":false,"send_allow":false,"property_stop":"payload","filter_stop":"snooze","ignore_case_stop":false,"negate_stop":false,"send_stop":false,"default_start":false,"differ":false,"x":750,"y":1400,"wires":[["dd3b0923.8f17d8"]]},{"id":"dd3b0923.8f17d8","type":"function","z":"395a3554.de723a","name":"Set Brightness","func":"newmsg = {}\nvar brightness = flow.get(\"brightness\");\n\nnewmsg.payload = { data: { \"brightness_pct\":brightness} }\n\nreturn newmsg;","outputs":1,"noerr":0,"x":960,"y":1400,"wires":[["f9141d9a.4951d","6eb73a95.c1c0c4"]]},{"id":"f9141d9a.4951d","type":"api-call-service","z":"395a3554.de723a","name":"Turn On Wake Light","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.cj_wake_light","data":"{\"rgb_color\":[255,200,100]}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1160,"y":1440,"wires":[[]]},{"id":"6eb73a95.c1c0c4","type":"function","z":"395a3554.de723a","name":"Increment Brightness","func":"var brightness = flow.get('brightness')||0;\n\nif (brightness < 100) {\n brightness = brightness + 1;\n flow.set(\"brightness\", brightness);\n \n newmsg = {\"payload\":\"looping\"}\n return newmsg;\n}\nelse {\n newmsg = {\"payload\":\"done\"};\n return newmsg;\n}","outputs":1,"noerr":0,"x":1400,"y":1400,"wires":[["8fdc3431.6ed5a8"]]},{"id":"8fdc3431.6ed5a8","type":"switch","z":"395a3554.de723a","name":"Is Loop Done?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"done","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1420,"y":1440,"wires":[["caf0861.4536278"]]},{"id":"b35bd0a4.ae015","type":"comment","z":"395a3554.de723a","name":"Finish Alarm Sequence","info":"","x":1480,"y":1500,"wires":[]},{"id":"caf0861.4536278","type":"link out","z":"395a3554.de723a","name":"FINISH ALARM SEQUENCE!","links":["850961fe.111c8","45deb28f.3cb32c","a40756c.5fa42a8"],"x":1375,"y":1520,"wires":[]},{"id":"a40756c.5fa42a8","type":"link in","z":"395a3554.de723a","name":"","links":["ed590c06.62219","caf0861.4536278"],"x":375,"y":1440,"wires":[["cb5c6f9b.9ac75"]]},{"id":"cb5c6f9b.9ac75","type":"change","z":"395a3554.de723a","name":"Stop","rules":[{"t":"set","p":"payload","pt":"msg","to":"snooze","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":1440,"wires":[["e90e3c6c.8935f"]]},{"id":"5bc78736.5c3368","type":"server-state-changed","z":"395a3554.de723a","name":"Snooze On","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.cj_alarm_snooze","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"x":320,"y":1520,"wires":[["cb5c6f9b.9ac75","3d7d081f.f9b258","692101f4.0c21"],[]]},{"id":"692101f4.0c21","type":"function","z":"395a3554.de723a","name":"Reset to Brightness / Volume","func":"flow.set(\"brightness\", 10);\nflow.set(\"volume\",0.3);\nnewmsg = {\"payload\":\"true\"}\nreturn newmsg;","outputs":1,"noerr":0,"x":880,"y":1520,"wires":[["cbbebc41.6387d"]]},{"id":"3d7d081f.f9b258","type":"delay","z":"395a3554.de723a","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":480,"y":1620,"wires":[["c98b873b.e5be58"]]},{"id":"c98b873b.e5be58","type":"api-call-service","z":"395a3554.de723a","name":"Snooze Off (Restart Loop)","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"homeassistant","service":"turn_off","entityId":"input_boolean.cj_alarm_snooze","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":750,"y":1620,"wires":[["22a2edad.858e92"]]},{"id":"22a2edad.858e92","type":"change","z":"395a3554.de723a","name":"Delete","rules":[{"t":"delete","p":"payload","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":950,"y":1560,"wires":[[]]},{"id":"cbbebc41.6387d","type":"api-call-service","z":"395a3554.de723a","name":"Turn Off Wake Light","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.cj_wake_light","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1160,"y":1520,"wires":[[]]},{"id":"6f6e5d0d.758254","type":"inject","z":"395a3554.de723a","name":"Brightness ---->","repeat":"6","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"brightness","payloadType":"flow","x":170,"y":1400,"wires":[["e90e3c6c.8935f"]]},{"id":"a9c52c1a.81791","type":"server-state-changed","z":"395a3554.de723a","name":"CJ Home?","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.cjhome","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is_not","outputs":2,"output_only_on_state_change":true,"x":160,"y":1060,"wires":[["a99a4ade.b91718","dd6d2887.4afd58"],[]]},{"id":"a99a4ade.b91718","type":"api-call-service","z":"395a3554.de723a","name":"Disable alarm if away","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.cj_alarm_enable","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":380,"y":1020,"wires":[[]]},{"id":"3763186f.419a38","type":"server-state-changed","z":"395a3554.de723a","name":"Reset Alarm","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.cj_alarm_running","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":490,"y":1560,"wires":[["692101f4.0c21","22a2edad.858e92","cb5c6f9b.9ac75"],[]]},{"id":"dd6d2887.4afd58","type":"api-call-service","z":"395a3554.de723a","name":"Turn off Alarm if running","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.cj_alarm_running","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":390,"y":1080,"wires":[[]]},{"id":"5f0e1d6a.a1a344","type":"comment","z":"395a3554.de723a","name":"Jen Wake Up","info":"","x":70,"y":1700,"wires":[]},{"id":"b3677e8b.dd07c","type":"moment","z":"395a3554.de723a","name":"Current Time","topic":"","input":"","inputType":"msg","inTz":"America/Detroit","adjAmount":0,"adjType":"days","adjDir":"add","format":"H:mm","locale":"C","output":"","outputType":"msg","outTz":"America/Detroit","x":670,"y":1780,"wires":[["77cfdd89.940234"]]},{"id":"5fb7d0f.f54903","type":"moment","z":"395a3554.de723a","name":"Alarm - Start time","topic":"","input":"","inputType":"msg","inTz":"America/Detroit","adjAmount":"10","adjType":"minutes","adjDir":"subtract","format":"H:mm","locale":"C","output":"","outputType":"msg","outTz":"America/Detroit","x":690,"y":1820,"wires":[["77cfdd89.940234"]]},{"id":"b6b11000.a3e08","type":"api-current-state","z":"395a3554.de723a","name":"Get Alarm Time","server":"543e2171.45071","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":true,"entity_id":"input_datetime.jen_wakeup_time","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":680,"y":1860,"wires":[["5fb7d0f.f54903"]]},{"id":"77cfdd89.940234","type":"join","z":"395a3554.de723a","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":910,"y":1780,"wires":[["102fbda3.91f152"]]},{"id":"102fbda3.91f152","type":"function","z":"395a3554.de723a","name":"Compare Times","func":"newmsg = {};\nif (msg.payload[0] == msg.payload[1]) {\n newmsg.payload = \"True\";\n} else {\n newmsg.payload = \"False\";\n}\n\nreturn newmsg;","outputs":1,"noerr":0,"x":940,"y":1820,"wires":[["6054ea10.091eb4"]]},{"id":"6054ea10.091eb4","type":"switch","z":"395a3554.de723a","name":"Is it Time?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"True","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":930,"y":1860,"wires":[["d4b64c56.a396f"]]},{"id":"b556f98a.a5d508","type":"comment","z":"395a3554.de723a","name":"TRIGGER WAKE UP","info":"","x":120,"y":1740,"wires":[]},{"id":"1b0cc39d.02689c","type":"inject","z":"395a3554.de723a","name":"","repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":110,"y":1780,"wires":[["e486d695.d4f078"]]},{"id":"e486d695.d4f078","type":"api-current-state","z":"395a3554.de723a","name":"Alarm Clock ON?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.jen_alarm_enable","state_type":"str","state_location":"","override_payload":"none","entity_location":"","override_data":"none","blockInputOverrides":false,"x":370,"y":1780,"wires":[["b3677e8b.dd07c","b6b11000.a3e08"],[]]},{"id":"d4b64c56.a396f","type":"api-call-service","z":"395a3554.de723a","name":"Jen - WakeUp","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.jen_alarm_running","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1140,"y":1860,"wires":[[]]},{"id":"d25b2dc5.05032","type":"server-state-changed","z":"395a3554.de723a","name":"Wake Jen","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.jen_alarm_running","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"x":100,"y":2160,"wires":[["672b7ac4.2504a4","36200c38.cae45c"],[]]},{"id":"672b7ac4.2504a4","type":"switch","z":"395a3554.de723a","name":"Is it Time?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":290,"y":2160,"wires":[["84503c62.bc134","f97501e.6dd3c"]]},{"id":"84503c62.bc134","type":"function","z":"395a3554.de723a","name":"Initialize Brightness/Volume","func":"flow.set(\"brightness\", 1);\nflow.set(\"volume\", 0);\n\nnewmsg = {\"payload\":\"true\"}\nreturn newmsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":620,"y":2160,"wires":[[]]},{"id":"f86f5636.3052b8","type":"inject","z":"395a3554.de723a","name":"","repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":870,"y":2160,"wires":[["84503c62.bc134"]]},{"id":"f946b30a.fa884","type":"server-state-changed","z":"395a3554.de723a","name":"Snooze Off","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.jen_alarm_snooze","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"x":320,"y":2260,"wires":[["f97501e.6dd3c"],[]]},{"id":"f97501e.6dd3c","type":"change","z":"395a3554.de723a","name":"Start","rules":[{"t":"set","p":"payload","pt":"msg","to":"start","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":2260,"wires":[["27abffa3.cd23b"]]},{"id":"27abffa3.cd23b","type":"traffic","z":"395a3554.de723a","name":"Brighten the Lights","property_allow":"payload","filter_allow":"start","ignore_case_allow":false,"negate_allow":false,"send_allow":false,"property_stop":"payload","filter_stop":"snooze","ignore_case_stop":false,"negate_stop":false,"send_stop":false,"default_start":false,"differ":false,"x":740,"y":2300,"wires":[["2b763c07.699914"]]},{"id":"2b763c07.699914","type":"function","z":"395a3554.de723a","name":"Set Brightness","func":"newmsg = {}\nvar brightness = flow.get(\"brightness\");\n\nnewmsg.payload = { data: { \"brightness_pct\":brightness} }\n\nreturn newmsg;","outputs":1,"noerr":0,"x":940,"y":2300,"wires":[["1f321228.c07dae","a366672e.a13fe8"]]},{"id":"1f321228.c07dae","type":"api-call-service","z":"395a3554.de723a","name":"Turn On Wake Light","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.jen_wake_light","data":"{\"rgb_color\":[255,200,100]}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1180,"y":2360,"wires":[[]]},{"id":"a366672e.a13fe8","type":"function","z":"395a3554.de723a","name":"Increment Brightness","func":"var brightness = flow.get('brightness')||0;\n\nif (brightness < 100) {\n brightness = brightness + 1;\n flow.set(\"brightness\", brightness);\n \n newmsg = {\"payload\":\"looping\"}\n return newmsg;\n}\nelse {\n newmsg = {\"payload\":\"done\"};\n return newmsg;\n}","outputs":1,"noerr":0,"x":1460,"y":2300,"wires":[["4755a1f6.bbc05"]]},{"id":"4755a1f6.bbc05","type":"switch","z":"395a3554.de723a","name":"Is Loop Done?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"done","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":1440,"y":2340,"wires":[["b65e1701.a22358"]]},{"id":"71a7ed2b.b70c04","type":"comment","z":"395a3554.de723a","name":"Finish Alarm Sequence","info":"","x":1480,"y":2380,"wires":[]},{"id":"b65e1701.a22358","type":"link out","z":"395a3554.de723a","name":"FINISH ALARM SEQUENCE!","links":["850961fe.111c8","45deb28f.3cb32c","8e387c93.f5925"],"x":1375,"y":2380,"wires":[]},{"id":"8e387c93.f5925","type":"link in","z":"395a3554.de723a","name":"","links":["ed590c06.62219","b65e1701.a22358"],"x":355,"y":2340,"wires":[["95777d5a.8c9e3"]]},{"id":"95777d5a.8c9e3","type":"change","z":"395a3554.de723a","name":"Stop","rules":[{"t":"set","p":"payload","pt":"msg","to":"snooze","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":2340,"wires":[["27abffa3.cd23b"]]},{"id":"5c669e8e.f6bee","type":"server-state-changed","z":"395a3554.de723a","name":"Snooze On","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.jen_alarm_snooze","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"x":320,"y":2420,"wires":[["95777d5a.8c9e3","fff59e6d.c83ca","87d2ec48.fba7c"],[]]},{"id":"fff59e6d.c83ca","type":"function","z":"395a3554.de723a","name":"Reset to Brightness / Volume","func":"flow.set(\"brightness\", 10);\nflow.set(\"volume\",0.3);\nnewmsg = {\"payload\":\"true\"}\nreturn newmsg;","outputs":1,"noerr":0,"x":900,"y":2420,"wires":[["4d2ec28.70ae23c"]]},{"id":"87d2ec48.fba7c","type":"delay","z":"395a3554.de723a","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":520,"y":2520,"wires":[["69ab7223.aeccec"]]},{"id":"69ab7223.aeccec","type":"api-call-service","z":"395a3554.de723a","name":"Snooze Off (Restart Loop)","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"homeassistant","service":"turn_off","entityId":"input_boolean.jen_alarm_snooze","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":730,"y":2520,"wires":[["7ec35521.f6b57c"]]},{"id":"7ec35521.f6b57c","type":"change","z":"395a3554.de723a","name":"Delete","rules":[{"t":"delete","p":"payload","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":970,"y":2460,"wires":[[]]},{"id":"4d2ec28.70ae23c","type":"api-call-service","z":"395a3554.de723a","name":"Turn Off Wake Light","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.jen_wake_light","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1180,"y":2420,"wires":[[]]},{"id":"30326695.1792ca","type":"inject","z":"395a3554.de723a","name":"Brightness ---->","repeat":"6","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"brightness","payloadType":"flow","x":150,"y":2300,"wires":[["27abffa3.cd23b"]]},{"id":"de4f0dd5.80eb2","type":"server-state-changed","z":"395a3554.de723a","name":"Jen Home?","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.jenhome","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":110,"y":1880,"wires":[["d7455072.99532","5c6c58c9.bd7a18"],[]]},{"id":"d7455072.99532","type":"api-call-service","z":"395a3554.de723a","name":"Disable alarm if away","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.jen_alarm_enable","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":380,"y":1840,"wires":[[]]},{"id":"efa5e7cd.6fd7c8","type":"server-state-changed","z":"395a3554.de723a","name":"Reset Alarm","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.jen_alarm_running","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":530,"y":2460,"wires":[["95777d5a.8c9e3","fff59e6d.c83ca","7ec35521.f6b57c"],[]]},{"id":"5c6c58c9.bd7a18","type":"api-call-service","z":"395a3554.de723a","name":"Turn off Alarm if running","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.jen_alarm_running","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":390,"y":1900,"wires":[[]]},{"id":"36870e7e.2dfff2","type":"api-call-service","z":"6a42a57e.13de6c","name":"Kitchen Dot","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"notify","service":"alexa_media_kitchen","entityId":"","data":"{\"message\":\"This is a weekly test. This is only a test\",\"data\":{\"type\":\"tts\"}}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1150,"y":1960,"wires":[[]]},{"id":"3920a3ce.f3354c","type":"inject","z":"6a42a57e.13de6c","name":"Manual Test","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":2000,"wires":[["34529917.9d20f6"]]},{"id":"34529917.9d20f6","type":"api-current-state","z":"6a42a57e.13de6c","name":"Kitchen Do-not-Disturb?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.alexa_kitchen_donotdisturb","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":570,"y":1960,"wires":[[],[]]},{"id":"70f3ce68.933d6","type":"switch","z":"6a42a57e.13de6c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"ON","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":330,"y":1940,"wires":[["f57d58af.b9e328","77cdb56b.2caebc","34529917.9d20f6","d5670cca.3a9ea"]]},{"id":"15fecdb8.a7fa12","type":"api-call-service","z":"9ab9f198.285b1","name":"Turn Off Kitchen pendant lights","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"switch.shelly1_c4fdf1","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1570,"y":1100,"wires":[[]]},{"id":"da960409.d6c4b","type":"api-current-state","z":"3d183616.022e8a","name":"Lights off?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.shelly1_c4fdf1","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":550,"y":60,"wires":[["da84a359.da616"],[]]},{"id":"2577f48.7c0fa0c","type":"api-render-template","z":"3d183616.022e8a","name":"Still in Kitchen?","server":"543e2171.45071","template":"{{ states.variable.last_motion.state != 'Kitchen Motion' }}","resultsLocation":"payload","resultsLocationType":"msg","templateLocation":"template","templateLocationType":"msg","x":780,"y":120,"wires":[["dadf4f65.4378c8"]]},{"id":"7a41b7bb.13778","type":"stoptimer","z":"3d183616.022e8a","duration":"10","units":"Minute","payloadtype":"num","payloadval":"0","name":"10min","x":570,"y":120,"wires":[["2577f48.7c0fa0c"],[]]},{"id":"dadf4f65.4378c8","type":"switch","z":"3d183616.022e8a","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"True","vt":"str"}],"checkall":"true","outputs":1,"x":950,"y":120,"wires":[["ba566423.14c0a8"]]},{"id":"bdc3092e.01a8e","type":"api-call-service","z":"9eeb0d55.a72a4","name":"Turn on Bay Outlet","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.shelly1_c4eb2d","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":550,"y":720,"wires":[[]]},{"id":"630d66bc.7a1148","type":"api-call-service","z":"9eeb0d55.a72a4","name":"Turn off Bay Outlet","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.shelly1_c4eb2d","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":550,"y":860,"wires":[[]]},{"id":"6cbeb5f7.b04084","type":"bigtimer","z":"5a64306a.6fec98","outtopic":"","outpayload1":"ON","outpayload2":"OFF","name":"EOD Pre-stage","comment":"","lat":"42.64036","lon":"-83.13634","starttime":"930","endtime":"1080","starttime2":0,"endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"ON","outtext2":"OFF","timeout":1440,"sun":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":false,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":0,"month7":0,"day8":0,"month8":0,"day9":0,"month9":0,"day10":0,"month10":0,"day11":0,"month11":0,"day12":0,"month12":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":120,"y":1100,"wires":[["633aa83d.1c4498"],[],[]]},{"id":"baea4597.c99218","type":"api-current-state","z":"5a64306a.6fec98","name":"CJ WFH?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.cj_wfh","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":420,"y":1180,"wires":[[],["fd426b59.fd53f8"]]},{"id":"6ed962fc.e22644","type":"api-current-state","z":"5a64306a.6fec98","name":"Jen WFH?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.jen_wfh","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":410,"y":1240,"wires":[[],["fd426b59.fd53f8"]]},{"id":"3673314a.2cedc6","type":"server-state-changed","z":"6a42a57e.13de6c","name":"Kitchen light switch firmware update","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.shelly_shsw_1_c4fdf1","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":200,"y":460,"wires":[["c080203d.62b6d"]]},{"id":"8cc762eb.109a1","type":"server-state-changed","z":"6a42a57e.13de6c","name":"Shelly bulb 1 firmware update","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.shelly_shblb_1_bc8574","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":220,"y":520,"wires":[["c080203d.62b6d"]]},{"id":"2ca55d05.9fdeb2","type":"server-state-changed","z":"6a42a57e.13de6c","name":"Shelly bulb 2 firmware update","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.shelly_shblb_1_bc85f4","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":220,"y":580,"wires":[["c080203d.62b6d"]]},{"id":"ddc902d0.0ff188","type":"server-state-changed","z":"6a42a57e.13de6c","name":"Light display firmware update","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.shelly_shsw_1_c42687","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":220,"y":640,"wires":[["c080203d.62b6d"]]},{"id":"bd4719b8.1f588","type":"server-state-changed","z":"6a42a57e.13de6c","name":"Bay Outlet firmware update","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.shelly_shsw_1_c4eb2d","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":230,"y":700,"wires":[["c080203d.62b6d"]]},{"id":"73462fb1.f3ebf","type":"server-state-changed","z":"3413a3a8.0b47ec","name":"House Mode?","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_select.house_mode","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":110,"y":800,"wires":[["2da8860a.f1a442"]]},{"id":"83e8127.79c1df","type":"switch","z":"3413a3a8.0b47ec","name":"Mode switch","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Morning","vt":"str"},{"t":"eq","v":"Day","vt":"str"},{"t":"eq","v":"Afternoon","vt":"str"},{"t":"eq","v":"Evening","vt":"str"},{"t":"eq","v":"Night","vt":"str"},{"t":"eq","v":"Sleep","vt":"str"}],"checkall":"true","repair":false,"outputs":6,"x":530,"y":700,"wires":[["65878efc.92bb9","7633c5b5.27c6bc","b1aa854f.7d1b78"],["71974d9.df56a34","55bbd4c7.2d2134"],[],["56997a97.223774","5e0dc374.3204ec"],[],["71974d9.df56a34"]]},{"id":"fcfd4e9b.9b8a6","type":"api-call-service","z":"3413a3a8.0b47ec","name":"Turn off Master Bedroom light(s)","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.02240033dc4f227acfe6","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1090,"y":820,"wires":[[]]},{"id":"56997a97.223774","type":"api-call-service","z":"3413a3a8.0b47ec","name":"Turn on Bedroom lights (eve)","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.02240033dc4f227acfe6","data":"{\"brightness_pct\":20}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1080,"y":700,"wires":[[]]},{"id":"ebdbea56.dc603","type":"bigtimer","z":"3413a3a8.0b47ec","outtopic":"","outpayload1":"Day","outpayload2":"","name":"Day","comment":"","lat":"42.64036","lon":"-83.13634","starttime":"600","endtime":"5002","starttime2":0,"endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"On","outtext2":"Off","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":"","month7":"","day8":"","month8":"","day9":"","month9":"","day10":"","month10":"","day11":"","month11":"","day12":"","month12":"","d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":310,"y":120,"wires":[["9e17f346.779a8"],[],[]]},{"id":"868b168.5459e68","type":"bigtimer","z":"3413a3a8.0b47ec","outtopic":"","outpayload1":"Afternoon","outpayload2":"","name":"Afternoon","comment":"","lat":"42.64036","lon":"-83.13634","starttime":"5002","endtime":"5001","starttime2":0,"endtime2":0,"startoff":0,"endoff":"-30","startoff2":0,"endoff2":"0","offs":0,"outtext1":"On","outtext2":"Off","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":"","month7":"","day8":"","month8":"","day9":"","month9":"","day10":"","month10":"","day11":"","month11":"","day12":"","month12":"","d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":300,"y":200,"wires":[["7c6d5534.c7d06c"],[],[]]},{"id":"5042982b.32639","type":"bigtimer","z":"3413a3a8.0b47ec","outtopic":"","outpayload1":"Night","outpayload2":"","name":"Night","comment":"","lat":"42.64036","lon":"-83.13634","starttime":"1260","endtime":"1320","starttime2":0,"endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"On","outtext2":"Off","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":"","month7":"","day8":"","month8":"","day9":"","month9":"","day10":"","month10":"","day11":"","month11":"","day12":"","month12":"","d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":310,"y":360,"wires":[["f3232e22.c0cfb"],[],[]]},{"id":"7222b8f8.bd72c","type":"bigtimer","z":"3413a3a8.0b47ec","outtopic":"","outpayload1":"Evening","outpayload2":"","name":"Evening","comment":"","lat":"42.64036","lon":"-83.13634","starttime":"5001","endtime":"1260","starttime2":0,"endtime2":0,"startoff":"-30","endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"On","outtext2":"Off","timeout":1440,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":"","month7":"","day8":"","month8":"","day9":"","month9":"","day10":"","month10":"","day11":"","month11":"","day12":"","month12":"","d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":300,"y":280,"wires":[["ba4f8d45.9eb9b"],[],[]]},{"id":"36200c38.cae45c","type":"link out","z":"395a3554.de723a","name":"Wake Jen","links":["69892e67.7411f","b6e49db9.621c7"],"x":235,"y":2200,"wires":[]},{"id":"c2d83bcc.8aa03","type":"link out","z":"395a3554.de723a","name":"Wake CJ","links":["69892e67.7411f","b6e49db9.621c7"],"x":275,"y":1240,"wires":[]},{"id":"97665d42.44a92","type":"api-call-service","z":"3413a3a8.0b47ec","name":"Set Morning","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_select","service":"select_option","entityId":"","data":"{\"entity_id\":\"input_select.house_mode\",\"option\":\"Morning\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":510,"y":40,"wires":[[]]},{"id":"acc69af9.58b8f8","type":"time-range-switch","z":"3413a3a8.0b47ec","name":"Morning","lat":"42.64036","lon":"-83.13634","startTime":"07:00","endTime":"10:00","startOffset":0,"endOffset":0,"x":300,"y":40,"wires":[["97665d42.44a92"],[]]},{"id":"b6e49db9.621c7","type":"link in","z":"3413a3a8.0b47ec","name":"Morning Trigger","links":["36200c38.cae45c","92a1612f.4f697","c2d83bcc.8aa03"],"x":195,"y":40,"wires":[["acc69af9.58b8f8"]]},{"id":"3ded9b2b.85355c","type":"api-call-service","z":"3413a3a8.0b47ec","name":"Set Sleep","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_select","service":"select_option","entityId":"","data":"{\"entity_id\":\"input_select.house_mode\",\"option\":\"Sleep\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":500,"y":420,"wires":[[]]},{"id":"d91a5578.416448","type":"time-range-switch","z":"3413a3a8.0b47ec","name":"Sleep","lat":"42.64036","lon":"-83.13634","startTime":"20:00","endTime":"07:00","startOffset":0,"endOffset":0,"x":310,"y":440,"wires":[["3ded9b2b.85355c"],[]]},{"id":"71974d9.df56a34","type":"api-current-state","z":"3413a3a8.0b47ec","name":"Bedroom Lights still on?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"On","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.02240033dc4f227acfe6","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":770,"y":820,"wires":[["fcfd4e9b.9b8a6"],[]]},{"id":"8df4a593.baa94","type":"server-state-changed","z":"3413a3a8.0b47ec","name":"Bedroom lights trigger","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.02240033dc4f227acfe6","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":160,"y":920,"wires":[["521bdbdf.a6d6ec"]]},{"id":"e307aa5e.9bd7e","type":"link in","z":"3413a3a8.0b47ec","name":"Sleep Trigger","links":["9e7df87a.677938"],"x":195,"y":440,"wires":[["d91a5578.416448"]]},{"id":"9e7df87a.677938","type":"link out","z":"3413a3a8.0b47ec","name":"Trigger Sleep","links":["e307aa5e.9bd7e"],"x":655,"y":980,"wires":[]},{"id":"724d0060.415fe8","type":"comment","z":"3413a3a8.0b47ec","name":"Sleep/Morning triggers","info":"","x":140,"y":880,"wires":[]},{"id":"92a1612f.4f697","type":"link out","z":"3413a3a8.0b47ec","name":"Trigger Morning","links":["b6e49db9.621c7"],"x":655,"y":1060,"wires":[]},{"id":"65878efc.92bb9","type":"api-call-service","z":"3413a3a8.0b47ec","name":"Start coffee","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.trigger_coffee","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1030,"y":580,"wires":[["87aeaf3.008645"]]},{"id":"2cb4873b.c7471","type":"server-state-changed","z":"3413a3a8.0b47ec","name":"Kitchen lights turned on","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.shelly1_c4fdf1","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":160,"y":1100,"wires":[["92a1612f.4f697"],[]]},{"id":"521bdbdf.a6d6ec","type":"switch","z":"3413a3a8.0b47ec","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"off","vt":"str"},{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":490,"y":1020,"wires":[["9e7df87a.677938"],["92a1612f.4f697"]]},{"id":"31624147.4ef5ae","type":"inject","z":"6a42a57e.13de6c","name":"Trigger test","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 01 * * 6","once":false,"onceDelay":0.1,"topic":"","payload":"ON","payloadType":"str","x":130,"y":1940,"wires":[["70f3ce68.933d6"]]},{"id":"7633c5b5.27c6bc","type":"link out","z":"3413a3a8.0b47ec","name":"Trigger Kitchen light","links":["1faf6782.fc0a58"],"x":975,"y":480,"wires":[]},{"id":"1faf6782.fc0a58","type":"link in","z":"3d183616.022e8a","name":"Kitchen light trigger","links":["7633c5b5.27c6bc"],"x":395,"y":40,"wires":[["da960409.d6c4b"]]},{"id":"af863f08.b704f","type":"server-state-changed","z":"3d183616.022e8a","name":"Kitchen Switch Flipped On","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"switch.shelly1_c4fdf1","entityidfiltertype":"substring","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"for":"","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":150,"y":180,"wires":[["ef1ffed6.5c02f8"]]},{"id":"ef9301ef.d2c7e","type":"change","z":"3d183616.022e8a","name":"STOP Timer","rules":[{"t":"set","p":"payload","pt":"msg","to":"STOP","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":180,"wires":[["7a41b7bb.13778"]]},{"id":"ef1ffed6.5c02f8","type":"api-current-state","z":"3d183616.022e8a","name":"Motion Enabled?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.nightlight_motion_enabled","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":410,"y":180,"wires":[["ef9301ef.d2c7e"],[]]},{"id":"5e0dc374.3204ec","type":"api-call-service","z":"3413a3a8.0b47ec","name":"Turn on Kitchen pendants","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.shelly1_c4fdf1","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1070,"y":760,"wires":[[]]},{"id":"90f168bc.244448","type":"stoptimer","z":"5a64306a.6fec98","duration":"5","units":"Minute","payloadtype":"num","payloadval":"0","name":"5min","x":1390,"y":420,"wires":[["647aefa7.4eeb2"],[]]},{"id":"9586eca0.e36a4","type":"server-events","z":"6de607f3.8ca218","name":"NFC Tag scanned","server":"543e2171.45071","event_type":"tag_scanned","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"waitForRunning":true,"x":130,"y":340,"wires":[["5e05abb1.92ee24"]]},{"id":"5e05abb1.92ee24","type":"switch","z":"6de607f3.8ca218","name":"Tag switch","property":"payload.event.tag_id","propertyType":"msg","rules":[{"t":"eq","v":"d02c1097-d5c9-4188-84fd-20872f523047","vt":"str"},{"t":"eq","v":"470443ff-8bc4-49b9-9f8a-86e3072dd64e","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":330,"y":340,"wires":[["7a12a763.a8f898"],["ce6147d5.1e50d8"]]},{"id":"7a12a763.a8f898","type":"change","z":"6de607f3.8ca218","name":"Cave Tag","rules":[{"t":"set","p":"payload","pt":"msg","to":"Cave_tag","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":140,"y":140,"wires":[["5aecca4c.4436c4"]]},{"id":"ce6147d5.1e50d8","type":"change","z":"6de607f3.8ca218","name":"Office Tag","rules":[{"t":"set","p":"payload","pt":"msg","to":"Office_tag","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":140,"y":520,"wires":[["60d1609b.4a71a"]]},{"id":"e9a4aeb5.6f7e2","type":"api-call-service","z":"6de607f3.8ca218","name":"Turn On Cave Main","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.cave_main","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1210,"y":40,"wires":[[]]},{"id":"9d268414.395c48","type":"api-call-service","z":"6de607f3.8ca218","name":"Turn On Cave Aux","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.cave_aux","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1490,"y":100,"wires":[[]]},{"id":"4c6e6072.8c73","type":"function","z":"6de607f3.8ca218","name":"Set Brightness 50%","func":"newmsg = {}\nvar brightness = flow.get(\"brightness\");\n\nnewmsg.payload = { data: { \"brightness_pct\":50} }\n\nreturn newmsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1210,"y":140,"wires":[["9d268414.395c48"]]},{"id":"fa1d0456.b0f3f8","type":"function","z":"6de607f3.8ca218","name":"Set Brightness 100%","func":"newmsg = {}\nvar brightness = flow.get(\"brightness\");\n\nnewmsg.payload = { data: { \"brightness_pct\":100} }\n\nreturn newmsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1220,"y":100,"wires":[["9d268414.395c48"]]},{"id":"770e72c.29fd18c","type":"api-current-state","z":"d3a6c9b0.41f988","name":"HVAC Mode","server":"543e2171.45071","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"climate.hallway_thermostat","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":170,"y":100,"wires":[["d3e03953.e8b538"]]},{"id":"d3e03953.e8b538","type":"switch","z":"d3a6c9b0.41f988","name":"heat/cool","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"heat","vt":"str"},{"t":"eq","v":"cool","vt":"str"},{"t":"eq","v":"auto","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":340,"y":100,"wires":[["1b30cfa0.25c66"],["bfedd2ee.ba92c"],["1b30cfa0.25c66","bfedd2ee.ba92c"]]},{"id":"1b30cfa0.25c66","type":"api-current-state","z":"d3a6c9b0.41f988","name":"Get Heat Comfort Temp","server":"543e2171.45071","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_number.heat_comfort_temp","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":590,"y":60,"wires":[["85c2486.b2473b8"]]},{"id":"bfedd2ee.ba92c","type":"api-current-state","z":"d3a6c9b0.41f988","name":"Get Cool Comfort Temp","server":"543e2171.45071","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_number.heat_comfort_temp","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":590,"y":140,"wires":[["f56c82a3.6e2ea"]]},{"id":"f56c82a3.6e2ea","type":"api-current-state","z":"d3a6c9b0.41f988","name":"Current setpoint > Comfort Temp (Cool)","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"payload","halt_if_type":"msg","halt_if_compare":"gt","override_topic":false,"entity_id":"climate.hallway_thermostat","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":900,"y":140,"wires":[["6c542f23.5d9b"],[]]},{"id":"85c2486.b2473b8","type":"api-current-state","z":"d3a6c9b0.41f988","name":"Current setpoint < Comfort Temp (Heat)","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"payload","halt_if_type":"msg","halt_if_compare":"lt","override_topic":false,"entity_id":"climate.hallway_thermostat","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":900,"y":60,"wires":[["6c542f23.5d9b"],[]]},{"id":"6c542f23.5d9b","type":"api-call-service","z":"d3a6c9b0.41f988","name":"Set comfort temp","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"climate","service":"set_temperature","entityId":"","data":"{\"entity_id\":\"climate.hallway_thermostat\",\"temperature\":\"{{payload}}\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1210,"y":100,"wires":[[]]},{"id":"fd426b59.fd53f8","type":"subflow:d3a6c9b0.41f988","z":"5a64306a.6fec98","name":"","x":690,"y":1260,"wires":[]},{"id":"e0374319.f2a8d","type":"server-state-changed","z":"5a64306a.6fec98","name":"Single user mode?","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.people_home","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"1","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":true,"ignorePrevStateUnavailable":true,"ignoreCurrentStateUnknown":true,"ignoreCurrentStateUnavailable":true,"x":130,"y":1360,"wires":[["e3b89fb3.e24c4"],["e5b07c7.aa2998"]]},{"id":"e3b89fb3.e24c4","type":"api-call-service","z":"5a64306a.6fec98","name":"Enable auto lights off","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.auto_lights_off","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":420,"y":1320,"wires":[[]]},{"id":"e5b07c7.aa2998","type":"api-call-service","z":"5a64306a.6fec98","name":"Disable auto lights off","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.auto_lights_off","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":420,"y":1400,"wires":[[]]},{"id":"f11599c0.4ccd58","type":"inject","z":"6a42a57e.13de6c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 01 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":250,"y":880,"wires":[["79fb55a4.eae6dc"]]},{"id":"10b2d880.9a1b98","type":"delay","z":"6a42a57e.13de6c","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":980,"y":780,"wires":[["ee80669.fb28898"]]},{"id":"ee80669.fb28898","type":"api-call-service","z":"6a42a57e.13de6c","name":"","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.dropbox_trigger","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1200,"y":780,"wires":[[]]},{"id":"a133abe.ce91558","type":"change","z":"6de607f3.8ca218","name":"Reset counter","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1240,"y":240,"wires":[["5aecca4c.4436c4"]]},{"id":"75305eb8.1ba39","type":"switch","z":"6de607f3.8ca218","name":"Scan count","property":"count","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"2","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":490,"y":140,"wires":[["389937.f101c6ca","f49aae3.6cff35"],["8d0f2346.1a316","dc8e6016.ff373"]]},{"id":"5aecca4c.4436c4","type":"counter","z":"6de607f3.8ca218","name":"","init":"0","step":"1","lower":"0","upper":"2","mode":"increment","outputs":1,"x":320,"y":140,"wires":[["75305eb8.1ba39"]]},{"id":"8d0f2346.1a316","type":"api-call-service","z":"6de607f3.8ca218","name":"Turn Off Cave Main","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.cave_main","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":970,"y":160,"wires":[["a133abe.ce91558"]]},{"id":"dc8e6016.ff373","type":"api-call-service","z":"6de607f3.8ca218","name":"Turn Off Cave Aux","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.cave_aux","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":970,"y":220,"wires":[["a133abe.ce91558"]]},{"id":"60d1609b.4a71a","type":"counter","z":"6de607f3.8ca218","name":"","init":"0","step":"1","lower":"0","upper":"2","mode":"increment","outputs":1,"x":320,"y":520,"wires":[["e680a763.5447f8"]]},{"id":"e680a763.5447f8","type":"switch","z":"6de607f3.8ca218","name":"Scan count","property":"count","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"2","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":490,"y":520,"wires":[["856ec512.da8f78"],[]]},{"id":"7290afea.0fc55","type":"change","z":"6de607f3.8ca218","name":"Reset counter","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1240,"y":620,"wires":[["60d1609b.4a71a"]]},{"id":"e29276f6.cdeb38","type":"api-current-state","z":"6de607f3.8ca218","name":"WFH Enabled?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.cj_wfh","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":960,"y":100,"wires":[["fa1d0456.b0f3f8"],["4c6e6072.8c73"]]},{"id":"856ec512.da8f78","type":"api-current-state","z":"6de607f3.8ca218","name":"WFH Enabled?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.jen_wfh","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":960,"y":480,"wires":[[],[]]},{"id":"bbe7cf2f.ced32","type":"poll-state","z":"5a64306a.6fec98","name":"CJ Location","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"5","updateIntervalUnits":"minutes","outputinitially":true,"outputonchanged":true,"entity_id":"device_tracker.google_maps_103298389060901230903","state_type":"str","halt_if":"home","halt_if_type":"str","halt_if_compare":"is_not","outputs":2,"x":110,"y":60,"wires":[["514f7f23.60043"],["453c4ca8.cc1ba4"]]},{"id":"e5300e71.b42cb","type":"poll-state","z":"5a64306a.6fec98","name":"Jen Location","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"5","updateIntervalUnits":"minutes","outputinitially":true,"outputonchanged":true,"entity_id":"device_tracker.google_maps_109285548108349468571","state_type":"str","halt_if":"home","halt_if_type":"str","halt_if_compare":"is_not","outputs":2,"x":110,"y":180,"wires":[["6f0bfe60.f83b7"],["d3111dd3.9880d"]]},{"id":"b7d08045.00e3","type":"poll-state","z":"5a64306a.6fec98","name":"Tori Location","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"5","updateIntervalUnits":"minutes","outputinitially":true,"outputonchanged":true,"entity_id":"device_tracker.google_maps_104665180205749213751","state_type":"str","halt_if":"home","halt_if_type":"str","halt_if_compare":"is_not","outputs":2,"x":110,"y":300,"wires":[["79c7a2cb.245ca4"],["b8eed97b.8a2b8"]]},{"id":"213e9ae8.9b3c76","type":"poll-state","z":"5a64306a.6fec98","name":"Seb Location","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"5","updateIntervalUnits":"minutes","outputinitially":true,"outputonchanged":true,"entity_id":"device_tracker.google_maps_108388660046996653768","state_type":"str","halt_if":"home","halt_if_type":"str","halt_if_compare":"is_not","outputs":2,"x":110,"y":420,"wires":[["d3dd8630.0ed3e"],["5e7dad82.53d834"]]},{"id":"389937.f101c6ca","type":"api-current-state","z":"6de607f3.8ca218","name":"Cave Aux is off","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.cave_aux","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":720,"y":100,"wires":[["e29276f6.cdeb38"],["dc8e6016.ff373"]]},{"id":"f49aae3.6cff35","type":"api-current-state","z":"6de607f3.8ca218","name":"Cave Main is off","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.cave_main","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":720,"y":40,"wires":[["80272be1.280fe8"],["8d0f2346.1a316"]]},{"id":"80272be1.280fe8","type":"api-current-state","z":"6de607f3.8ca218","name":"WFH Enabled?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.cj_wfh","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":960,"y":40,"wires":[["e9a4aeb5.6f7e2"],[]]},{"id":"ad819f24.dea61","type":"poll-state","z":"395a3554.de723a","name":"Calendar alarm","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalUnits":"minutes","outputinitially":true,"outputonchanged":true,"entity_id":"calendar.cj_ramseyer","state_type":"str","halt_if":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"x":140,"y":1160,"wires":[["9d6983e3.0f0fc","97fae734.9575d8"]]},{"id":"9d6983e3.0f0fc","type":"switch","z":"395a3554.de723a","name":"","property":"data.attributes.message","propertyType":"msg","rules":[{"t":"eq","v":"Alarm","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":330,"y":1160,"wires":[["88ab73ca.03fc5"]]},{"id":"c6d4a356.26deb8","type":"poll-state","z":"395a3554.de723a","name":"Calendar Alarm","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalUnits":"minutes","outputinitially":true,"outputonchanged":true,"entity_id":"calendar.jen_blankenship","state_type":"str","halt_if":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"x":100,"y":1980,"wires":[["30fbcdcb.9b23d2","14944f50.979a01"]]},{"id":"30fbcdcb.9b23d2","type":"switch","z":"395a3554.de723a","name":"","property":"data.attributes.message","propertyType":"msg","rules":[{"t":"eq","v":"Alarm","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":330,"y":1980,"wires":[["e63cbf68.874398"]]},{"id":"d189f15.2473c1","type":"comment","z":"395a3554.de723a","name":"Initialize variables","info":"","x":590,"y":1240,"wires":[]},{"id":"1c51215a.66bb7f","type":"comment","z":"395a3554.de723a","name":"Alarm sequence - CJ","info":"","x":120,"y":1220,"wires":[]},{"id":"89406670.ba776","type":"comment","z":"395a3554.de723a","name":"Alarm sequence - Jen","info":"","x":120,"y":2120,"wires":[]},{"id":"b22fc385.c8b908","type":"api-call-service","z":"395a3554.de723a","name":"Set Alarm time to Calendar","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_datetime","service":"set_datetime","entityId":"","data":"{\"entity_id\":\"input_datetime.cj_wakeup_time\",\"time\":\"{{payload}}\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1240,"y":1260,"wires":[[]]},{"id":"3bac8735.489b48","type":"api-call-service","z":"395a3554.de723a","name":"Set Alarm time to Calendar","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_datetime","service":"set_datetime","entityId":"input_datetime.jen_wakeup_time","data":"{\"entity_id\":\"input_datetime.jen_wakeup_time\",\"time\":\"{{payload}}\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1180,"y":2080,"wires":[[]]},{"id":"88ab73ca.03fc5","type":"change","z":"395a3554.de723a","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"data.attributes.start_time","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":1160,"wires":[["3e77554a.89c46a","d17ca41e.8e3a18"]]},{"id":"e63cbf68.874398","type":"change","z":"395a3554.de723a","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"data.attributes.start_time","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":480,"y":1980,"wires":[["126b2184.51786e","5c39dd1b.58cf14"]]},{"id":"3e77554a.89c46a","type":"moment","z":"395a3554.de723a","name":"Time format","topic":"","input":"","inputType":"msg","inTz":"America/Detroit","adjAmount":0,"adjType":"days","adjDir":"add","format":"H:mm:ss","locale":"C","output":"","outputType":"msg","outTz":"America/Detroit","x":710,"y":1200,"wires":[["e09c7878.1c16a8"]]},{"id":"126b2184.51786e","type":"moment","z":"395a3554.de723a","name":"Time format","topic":"","input":"","inputType":"msg","inTz":"America/Detroit","adjAmount":0,"adjType":"days","adjDir":"add","format":"H:mm:ss","locale":"C","output":"","outputType":"msg","outTz":"America/Detroit","x":670,"y":2020,"wires":[["8d692144.c05e4"]]},{"id":"b6980a0.6aaf778","type":"server-state-changed","z":"6a42a57e.13de6c","name":"Memory Usage","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.memory_use_percent","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":880,"y":400,"wires":[["33206af7.de7016"]]},{"id":"d17ca41e.8e3a18","type":"moment","z":"395a3554.de723a","name":"Date format","topic":"","input":"","inputType":"msg","inTz":"America/Detroit","adjAmount":0,"adjType":"days","adjDir":"add","format":"MM/DD/yyyy","locale":"C","output":"","outputType":"msg","outTz":"America/Detroit","x":710,"y":1160,"wires":[["696ab4bc.24d124"]]},{"id":"f49ea288.71018","type":"function","z":"395a3554.de723a","name":"Compare Dates","func":"newmsg = {};\nif (msg.payload[0] == msg.payload[1]) {\n newmsg.payload = \"True\";\n} else {\n newmsg.payload = \"False\";\n}\n\nreturn newmsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":980,"y":1160,"wires":[["e4039846.392bf"]]},{"id":"97fae734.9575d8","type":"moment","z":"395a3554.de723a","name":"Current Date","topic":"","input":"","inputType":"date","inTz":"America/Detroit","adjAmount":0,"adjType":"days","adjDir":"add","format":"MM/DD/yyyy","locale":"C","output":"","outputType":"msg","outTz":"America/Detroit","x":710,"y":1120,"wires":[["696ab4bc.24d124"]]},{"id":"696ab4bc.24d124","type":"join","z":"395a3554.de723a","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":950,"y":1120,"wires":[["f49ea288.71018"]]},{"id":"e4039846.392bf","type":"switch","z":"395a3554.de723a","name":"Is it the right date?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"True","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":990,"y":1200,"wires":[["c035e668.a3f418"]]},{"id":"e09c7878.1c16a8","type":"api-current-state","z":"395a3554.de723a","name":"Set by Calendar","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.set_by_calendar","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":980,"y":1240,"wires":[["b22fc385.c8b908"],[]]},{"id":"c035e668.a3f418","type":"api-call-service","z":"395a3554.de723a","name":"Enable set by calendar","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.set_by_calendar","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1220,"y":1200,"wires":[["cc378961.cf935"]]},{"id":"cc378961.cf935","type":"delay","z":"395a3554.de723a","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1440,"y":1200,"wires":[["4d26e084.58fbe8"]]},{"id":"4d26e084.58fbe8","type":"api-call-service","z":"395a3554.de723a","name":"Turn off set by calendar","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.set_by_calendar","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1650,"y":1200,"wires":[[]]},{"id":"14944f50.979a01","type":"moment","z":"395a3554.de723a","name":"Current Date","topic":"","input":"","inputType":"date","inTz":"America/Detroit","adjAmount":0,"adjType":"days","adjDir":"add","format":"MM/DD/yyyy","locale":"C","output":"","outputType":"msg","outTz":"America/Detroit","x":670,"y":1940,"wires":[["b1479e13.7ef81"]]},{"id":"5c39dd1b.58cf14","type":"moment","z":"395a3554.de723a","name":"Date format","topic":"","input":"","inputType":"msg","inTz":"America/Detroit","adjAmount":0,"adjType":"days","adjDir":"add","format":"MM/DD/yyyy","locale":"C","output":"","outputType":"msg","outTz":"America/Detroit","x":670,"y":1980,"wires":[["b1479e13.7ef81"]]},{"id":"b1479e13.7ef81","type":"join","z":"395a3554.de723a","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":910,"y":1940,"wires":[["e65ed29c.961bc8"]]},{"id":"e65ed29c.961bc8","type":"function","z":"395a3554.de723a","name":"Compare Dates","func":"newmsg = {};\nif (msg.payload[0] == msg.payload[1]) {\n newmsg.payload = \"True\";\n} else {\n newmsg.payload = \"False\";\n}\n\nreturn newmsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":940,"y":1980,"wires":[["3fcf1af4.959fc6"]]},{"id":"3fcf1af4.959fc6","type":"switch","z":"395a3554.de723a","name":"Is it the right date?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"True","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":950,"y":2020,"wires":[["b5ea31a0.125658"]]},{"id":"8d692144.c05e4","type":"api-current-state","z":"395a3554.de723a","name":"Set by Calendar","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.set_by_calendar","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":940,"y":2060,"wires":[["3bac8735.489b48"],[]]},{"id":"b5ea31a0.125658","type":"api-call-service","z":"395a3554.de723a","name":"Enable set by calendar","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.set_by_calendar","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1160,"y":2020,"wires":[["61fdab9c.d3e7e4"]]},{"id":"8d2a6aa.00b2798","type":"api-call-service","z":"395a3554.de723a","name":"Turn off set by calendar","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.set_by_calendar","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1570,"y":2020,"wires":[[]]},{"id":"61fdab9c.d3e7e4","type":"delay","z":"395a3554.de723a","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1360,"y":2020,"wires":[["8d2a6aa.00b2798"]]},{"id":"fe3ca3a3.8b9e5","type":"weekday","z":"395a3554.de723a","name":"AutoEnable-by-day","sun":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":false,"x":250,"y":600,"wires":[["90824873.9c3448","fcfbf1bb.9590f","1ccda375.9aa50d","8379d4ec.d7a2d8"],["3fe875be.dd009a","144585af.987aaa","1ccda375.9aa50d","8379d4ec.d7a2d8"]]},{"id":"a3326c4b.49c31","type":"api-call-service","z":"9ab9f198.285b1","name":"Turn Off - Landing Lights","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.shelly1_55f0fe","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1250,"y":220,"wires":[[]]},{"id":"dbc0a4b9.3579f8","type":"api-call-service","z":"9ab9f198.285b1","name":"Turn Off - Carriage Light Front","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.shelly1pm_c45421","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1270,"y":280,"wires":[[]]},{"id":"2a28a993.a1e6c6","type":"api-call-service","z":"9ab9f198.285b1","name":"Turn Off - Carriage Light Side","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.shelly1pm_c44770","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1260,"y":340,"wires":[[]]},{"id":"f94b1926.cd7d18","type":"api-call-service","z":"9ab9f198.285b1","name":"Turn On - Landing Lights","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.shelly1_55f0fe","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1250,"y":40,"wires":[[]]},{"id":"92300bb5.89d3a8","type":"api-call-service","z":"9ab9f198.285b1","name":"Turn On - Carriage Light Front","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.shelly1pm_c45421","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1270,"y":100,"wires":[[]]},{"id":"5093382.c7740c8","type":"api-call-service","z":"9ab9f198.285b1","name":"Turn On - Carriage Light Side","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.shelly1pm_c44770","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1260,"y":160,"wires":[[]]},{"id":"83f632f9.c7ee8","type":"comment","z":"75150d47.109fb4","name":"On call/Meeting indicator","info":"","x":110,"y":40,"wires":[]},{"id":"f2460e4f.e44bd","type":"api-call-service","z":"75150d47.109fb4","name":"CJ busy - On","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.cj_busy","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":590,"y":220,"wires":[[]]},{"id":"a5d9d5ae.de8008","type":"api-call-service","z":"75150d47.109fb4","name":"Jen busy - On","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.jen_busy","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":600,"y":340,"wires":[[]]},{"id":"b982e600.7c2808","type":"api-call-service","z":"75150d47.109fb4","name":"CJ busy - Off","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.cj_busy","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":590,"y":280,"wires":[[]]},{"id":"ba7f7f36.3672d","type":"api-call-service","z":"75150d47.109fb4","name":"Jen busy - Off","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.jen_busy","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":600,"y":400,"wires":[[]]},{"id":"8464e632.d686f8","type":"switch","z":"75150d47.109fb4","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":370,"y":260,"wires":[["f2460e4f.e44bd"],["b982e600.7c2808"]]},{"id":"dd802c25.2331d","type":"switch","z":"75150d47.109fb4","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":370,"y":360,"wires":[["a5d9d5ae.de8008"],["ba7f7f36.3672d"]]},{"id":"ba148cc6.10ea2","type":"api-call-service","z":"9eeb0d55.a72a4","name":"Turn On - Landing Lights","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.shelly1_55f0fe","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":950,"y":500,"wires":[[]]},{"id":"7211812.254be8","type":"api-call-service","z":"9eeb0d55.a72a4","name":"Turn On - Carriage Light Front","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.shelly1pm_c45421","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":970,"y":560,"wires":[[]]},{"id":"c0a3363.73e81c8","type":"api-call-service","z":"9eeb0d55.a72a4","name":"Turn On - Carriage Light Side","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.shelly1pm_c44770","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":960,"y":620,"wires":[[]]},{"id":"50eb48a3.c6c598","type":"link out","z":"3d183616.022e8a","name":"Trigger Morning","links":[],"x":255,"y":60,"wires":[]},{"id":"999d999b.e0c8f8","type":"link in","z":"3413a3a8.0b47ec","name":"Morning motion trigger","links":[],"x":235,"y":1020,"wires":[["521bdbdf.a6d6ec"]]},{"id":"b1aa854f.7d1b78","type":"subflow:d3a6c9b0.41f988","z":"3413a3a8.0b47ec","name":"","x":1050,"y":520,"wires":[]},{"id":"d5670cca.3a9ea","type":"api-current-state","z":"6a42a57e.13de6c","name":"Media Room Do-not-Disturb?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.alexa_media_room_donotdisturb","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":580,"y":2020,"wires":[[],[]]},{"id":"77cdb56b.2caebc","type":"api-current-state","z":"6a42a57e.13de6c","name":"Master Bedroom Do-not-Disturb?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.alexa_master_bedroom_donotdisturb","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":600,"y":1900,"wires":[[],[]]},{"id":"f57d58af.b9e328","type":"api-current-state","z":"6a42a57e.13de6c","name":"Office Do-not-Disturb?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.alexa_office_donotdisturb","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":560,"y":1840,"wires":[[],[]]},{"id":"73c8bfd1.59d99","type":"api-call-service","z":"6a42a57e.13de6c","name":"Office Dot","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"notify","service":"alexa_media_office","entityId":"","data":"{\"message\":\"This is a weekly test. This is only a test\",\"data\":{\"type\":\"tts\"}}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1140,"y":1840,"wires":[[]]},{"id":"9fe98ce6.84b73","type":"api-call-service","z":"6a42a57e.13de6c","name":"Master Bedroom Dot","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"notify","service":"alexa_media_master_bedroom","entityId":"","data":"{\"message\":\"This is a weekly test. This is only a test\",\"data\":{\"type\":\"tts\"}}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1180,"y":1900,"wires":[[]]},{"id":"2dbc1625.347fda","type":"api-call-service","z":"6a42a57e.13de6c","name":"Media Room Bedroom Dot","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"notify","service":"alexa_media_media_room","entityId":"","data":"{\"message\":\"This is a weekly test. This is only a test\",\"data\":{\"type\":\"tts\"}}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1200,"y":2020,"wires":[[]]},{"id":"3961d38e.3e9e3c","type":"api-call-service","z":"6a42a57e.13de6c","name":"Set Kitchen Volume","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"media_player","service":"volume_set","entityId":"media_player.kitchen","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":890,"y":1960,"wires":[["36870e7e.2dfff2"]]},{"id":"c990a1f.c65206","type":"api-call-service","z":"6a42a57e.13de6c","name":"Set Office Volume","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"media_player","service":"volume_set","entityId":"media_player.office","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":890,"y":1840,"wires":[["73c8bfd1.59d99"]]},{"id":"32b25bae.b70b74","type":"api-call-service","z":"6a42a57e.13de6c","name":"Set Master Bedroom Volume","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"media_player","service":"volume_set","entityId":"media_player.master_bedroom","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":920,"y":1900,"wires":[["9fe98ce6.84b73"]]},{"id":"834d3080.8feeb","type":"api-call-service","z":"6a42a57e.13de6c","name":"Set Media Room Volume","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"media_player","service":"volume_set","entityId":"media_player.media_room","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":910,"y":2020,"wires":[["2dbc1625.347fda"]]},{"id":"598302aa.8b73c4","type":"server-state-changed","z":"5a64306a.6fec98","name":"Away lights off","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.occupied","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"off","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"5","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":90,"y":920,"wires":[["dd73bb34.3e3eb","ba61ccf.94722b","610a9737.12c898"],[]]},{"id":"dd73bb34.3e3eb","type":"api-call-service","z":"5a64306a.6fec98","name":"Side entry Off","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.shelly1_55e7ad","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":340,"y":920,"wires":[[]]},{"id":"ba61ccf.94722b","type":"api-call-service","z":"5a64306a.6fec98","name":"Turn Off Kitchen pendant lights","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"switch.shelly1_c4fdf1","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":390,"y":980,"wires":[[]]},{"id":"610a9737.12c898","type":"api-call-service","z":"5a64306a.6fec98","name":"Turn off Master Bedroom light(s)","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.02240033dc4f227acfe6","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":390,"y":860,"wires":[[]]},{"id":"1b604c9b.34a453","type":"bigtimer","z":"d149ef89.67e71","outtopic":"","outpayload1":"on","outpayload2":"off","name":"CJ Office Hours","comment":"","lat":"42.64036","lon":"-83.13634","starttime":"420","endtime":"1080","starttime2":0,"endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"on","outtext2":"off","timeout":1440,"sun":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":false,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":0,"month7":0,"day8":0,"month8":0,"day9":0,"month9":0,"day10":0,"month10":0,"day11":0,"month11":0,"day12":0,"month12":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":"3","xmonth1":"7","xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":200,"y":100,"wires":[["6990ead8.9fe394"],[],[]]},{"id":"f1547d0a.1b602","type":"bigtimer","z":"d149ef89.67e71","outtopic":"","outpayload1":"on","outpayload2":"off","name":"Jen Office Hours","comment":"","lat":"42.64036","lon":"-83.13634","starttime":"480","endtime":"1080","starttime2":0,"endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"on","outtext2":"off","timeout":1440,"sun":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":false,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":0,"month7":0,"day8":0,"month8":0,"day9":0,"month9":0,"day10":0,"month10":0,"day11":0,"month11":0,"day12":0,"month12":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":210,"y":300,"wires":[["f0090121.d9e2c"],[],[]]},{"id":"6990ead8.9fe394","type":"api-current-state","z":"d149ef89.67e71","name":"CJ home?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.cjhome","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":430,"y":80,"wires":[["d3930bec.aab638"],[]]},{"id":"f0090121.d9e2c","type":"api-current-state","z":"d149ef89.67e71","name":"Jen home?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.jenhome","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":430,"y":280,"wires":[["f3e91f21.d08da"],[]]},{"id":"d3930bec.aab638","type":"api-current-state","z":"d149ef89.67e71","name":"CJ WFH","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.cj_wfh","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":660,"y":80,"wires":[["146dd9c5.10ea1e"],[]]},{"id":"f3e91f21.d08da","type":"api-current-state","z":"d149ef89.67e71","name":"Jen WFH","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.jen_wfh","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":660,"y":280,"wires":[["db2a6ef.113c21"],[]]},{"id":"6a49e7c3.282478","type":"subflow:d3a6c9b0.41f988","z":"d149ef89.67e71","name":"","x":1050,"y":180,"wires":[]},{"id":"55bbd4c7.2d2134","type":"api-call-service","z":"3413a3a8.0b47ec","name":"Turn off Kitchen pendants","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.shelly1_c4fdf1","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1070,"y":640,"wires":[[]]},{"id":"2da8860a.f1a442","type":"api-current-state","z":"3413a3a8.0b47ec","name":"Vacation mode?","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.vacation","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":300,"y":800,"wires":[["83e8127.79c1df"],[]]},{"id":"146dd9c5.10ea1e","type":"switch","z":"d149ef89.67e71","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":830,"y":80,"wires":[["6a49e7c3.282478"],["70f4ff5d.13b578","e94cc901.e631d"]]},{"id":"db2a6ef.113c21","type":"switch","z":"d149ef89.67e71","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":830,"y":280,"wires":[["6a49e7c3.282478"],[]]},{"id":"70f4ff5d.13b578","type":"function","z":"d149ef89.67e71","name":"Set Brightness 50%","func":"newmsg = {}\nvar brightness = flow.get(\"brightness\");\n\nnewmsg.payload = { data: { \"brightness_pct\":50} }\n\nreturn newmsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1030,"y":60,"wires":[["2e66c6a6.91d262"]]},{"id":"2e66c6a6.91d262","type":"api-call-service","z":"d149ef89.67e71","name":"Turn On Cave Aux","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.cave_aux","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1270,"y":60,"wires":[[]]},{"id":"e94cc901.e631d","type":"api-call-service","z":"d149ef89.67e71","name":"Turn Off Cave Main","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.cave_main","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1270,"y":120,"wires":[[]]},{"id":"ec8fb20d.e9f5d8","type":"poll-state","z":"d149ef89.67e71","name":"CJ Work-Holiday","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalUnits":"minutes","outputinitially":true,"outputonchanged":true,"entity_id":"calendar.cj_ramseyer","state_type":"str","halt_if":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"x":200,"y":580,"wires":[["c62aa1c9.fee42"]]},{"id":"a5e8fa7b.b5883","type":"poll-state","z":"d149ef89.67e71","name":"US Holiday Cal events","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalUnits":"minutes","outputinitially":true,"outputonchanged":true,"entity_id":"calendar.holidays_in_united_states","state_type":"str","halt_if":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"x":220,"y":520,"wires":[["9d9df5c4.ca0cd8"]]},{"id":"c62aa1c9.fee42","type":"switch","z":"d149ef89.67e71","name":"","property":"data.attributes.message","propertyType":"msg","rules":[{"t":"eq","v":"Work-Holiday","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":410,"y":580,"wires":[["7481ed3b.e2315c"]]},{"id":"6498d275.231aac","type":"switch","z":"d149ef89.67e71","name":"","property":"data.attributes.message","propertyType":"msg","rules":[{"t":"eq","v":"Work-Holiday","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":410,"y":460,"wires":[["d30bd9f6.72e6c8"]]},{"id":"7087df62.47d5f","type":"poll-state","z":"d149ef89.67e71","name":"Jen Work-Holiday","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"60","updateIntervalUnits":"minutes","outputinitially":true,"outputonchanged":true,"entity_id":"calendar.jen_blankenship","state_type":"str","halt_if":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"x":200,"y":460,"wires":[["6498d275.231aac"]]},{"id":"d30bd9f6.72e6c8","type":"api-call-service","z":"d149ef89.67e71","name":"Jen Disable WFH","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.jen_wfh","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":630,"y":460,"wires":[[]]},{"id":"7481ed3b.e2315c","type":"api-call-service","z":"d149ef89.67e71","name":"CJ Disable WFH","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.cj_wfh","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":620,"y":580,"wires":[[]]},{"id":"9d9df5c4.ca0cd8","type":"switch","z":"d149ef89.67e71","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":410,"y":520,"wires":[["d30bd9f6.72e6c8","7481ed3b.e2315c"]]},{"id":"afebf90.9bde708","type":"api-call-service","z":"6a42a57e.13de6c","name":"HA Notify","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"persistent_notification","service":"create","entityId":"","data":"{\"title\":\"Memory usage Alert\",\"message\":\"Memory usage has exceed 75%!\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1360,"y":400,"wires":[[]]},{"id":"33206af7.de7016","type":"excursion","z":"6a42a57e.13de6c","name":"Allowable memory range","time":"3600","softmax":"75","softmin":"50","hardmax":"85","hardmin":"0","x":1110,"y":400,"wires":[[]]},{"id":"9677ac87.1e6768","type":"debug","z":"6a42a57e.13de6c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1350,"y":340,"wires":[]},{"id":"75c39297.fc77a4","type":"inject","z":"6a42a57e.13de6c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":true,"onceDelay":"5","topic":"","payload":"","payloadType":"date","x":190,"y":1060,"wires":[["8b178604.599468"]]},{"id":"7d43703b.cac34","type":"inject","z":"3413a3a8.0b47ec","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Evening","payloadType":"str","x":320,"y":680,"wires":[["83e8127.79c1df"]]},{"id":"1f2d5d16.02c6e3","type":"inject","z":"3413a3a8.0b47ec","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Afternoon","payloadType":"str","x":320,"y":640,"wires":[["83e8127.79c1df"]]},{"id":"7ba06cd1.78afa4","type":"inject","z":"3413a3a8.0b47ec","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Day","payloadType":"str","x":330,"y":600,"wires":[["83e8127.79c1df"]]},{"id":"c5e77591.dfff8","type":"inject","z":"3413a3a8.0b47ec","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Morning","payloadType":"str","x":320,"y":560,"wires":[["83e8127.79c1df"]]},{"id":"643fefa4.0bf0d8","type":"inject","z":"3413a3a8.0b47ec","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Night","payloadType":"str","x":330,"y":720,"wires":[["83e8127.79c1df"]]},{"id":"a82eebc3.42341","type":"inject","z":"3413a3a8.0b47ec","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"Sleep","payloadType":"str","x":330,"y":760,"wires":[["83e8127.79c1df"]]},{"id":"87aeaf3.008645","type":"delay","z":"3413a3a8.0b47ec","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1220,"y":580,"wires":[["bf222b11.448108"]]},{"id":"bf222b11.448108","type":"api-call-service","z":"3413a3a8.0b47ec","name":"Start coffee","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.trigger_coffee","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1410,"y":580,"wires":[[]]},{"id":"f5650c1b.043d9","type":"inject","z":"3413a3a8.0b47ec","name":"Lights already on test","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"00 07 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":1180,"wires":[["94fbdd64.6759e8","2406827.1ecb07e"]]},{"id":"94fbdd64.6759e8","type":"api-current-state","z":"3413a3a8.0b47ec","name":"Kitchen Lights On!","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.shelly1_c4fdf1","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":430,"y":1140,"wires":[["92a1612f.4f697"],[]]},{"id":"2406827.1ecb07e","type":"api-current-state","z":"3413a3a8.0b47ec","name":"Bedroom Lights On!","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.02240033dc4f227acfe6","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":440,"y":1200,"wires":[["92a1612f.4f697"],[]]},{"id":"517f79f5.ec45f8","type":"inject","z":"2f176f59.aa012","name":"Pulse (1min)","props":[{"p":"payload","v":"","vt":"date"},{"p":"topic","v":"","vt":"string"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":80,"wires":[["9c80aebd.9375d","ce11983.306f068","bd108c5b.25d61","962b86a0.887b88","b9456d67.5c5d2"]]},{"id":"9c80aebd.9375d","type":"api-current-state","z":"2f176f59.aa012","name":"Landing lights watchdog","server":"543e2171.45071","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.shelly_55f0fe","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":390,"y":80,"wires":[["be33041f.c75f18"]]},{"id":"ce11983.306f068","type":"api-current-state","z":"2f176f59.aa012","name":"Front Carriage light watchdog","server":"543e2171.45071","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.shelly1pm_c45421","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":410,"y":140,"wires":[["f9c2edf5.c9052"]]},{"id":"bd108c5b.25d61","type":"api-current-state","z":"2f176f59.aa012","name":"Side Carriage light watchdog","server":"543e2171.45071","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.shelly1pm_c44770","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":400,"y":200,"wires":[["9b90f1b9.26e63"]]},{"id":"be33041f.c75f18","type":"change","z":"2f176f59.aa012","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"OK","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":80,"wires":[["4b9dfc54.540424"]]},{"id":"f9c2edf5.c9052","type":"change","z":"2f176f59.aa012","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"OK","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":140,"wires":[["eeb017d8.641ba8"]]},{"id":"9b90f1b9.26e63","type":"change","z":"2f176f59.aa012","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"OK","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":200,"wires":[["49048f32.cad1"]]},{"id":"4b9dfc54.540424","type":"mqtt out","z":"2f176f59.aa012","name":"Checkin Landing lights","topic":"checkin/landing","qos":"","retain":"false","broker":"19f2fec8.28ebf1","x":900,"y":80,"wires":[]},{"id":"49048f32.cad1","type":"mqtt out","z":"2f176f59.aa012","name":"Checkiin Carriage Side","topic":"checkin/carriageside","qos":"","retain":"false","broker":"19f2fec8.28ebf1","x":900,"y":200,"wires":[]},{"id":"eeb017d8.641ba8","type":"mqtt out","z":"2f176f59.aa012","name":"Checkin Carriage Front","topic":"checkin/carriagefront","qos":"","retain":"false","broker":"19f2fec8.28ebf1","x":910,"y":140,"wires":[]},{"id":"bbf8c438.dc2598","type":"mqtt in","z":"2f176f59.aa012","name":"Landing lights Status","topic":"checkin/landing","qos":"2","datatype":"utf8","broker":"19f2fec8.28ebf1","x":390,"y":380,"wires":[["7f718f1e.552c5"]]},{"id":"80f451ab.f85d3","type":"mqtt in","z":"2f176f59.aa012","name":"Side Carriage light Status","topic":"checkin/carriageside","qos":"2","datatype":"utf8","broker":"19f2fec8.28ebf1","x":410,"y":500,"wires":[["a5b51957.b13e78"]]},{"id":"716fe895.555158","type":"mqtt in","z":"2f176f59.aa012","name":"Front carriage light Status","topic":"checkin/carriagefront","qos":"2","datatype":"utf8","broker":"19f2fec8.28ebf1","x":410,"y":440,"wires":[["6391af73.47173"]]},{"id":"7f718f1e.552c5","type":"trigger","z":"2f176f59.aa012","name":"","op1":"","op2":"Unknown","op1type":"nul","op2type":"str","duration":"300","extend":true,"units":"s","reset":"","bytopic":"all","outputs":1,"x":670,"y":380,"wires":[["7ae4fd25.a48e94"]]},{"id":"a5b51957.b13e78","type":"trigger","z":"2f176f59.aa012","name":"","op1":"","op2":"Unknown","op1type":"nul","op2type":"str","duration":"300","extend":true,"units":"s","reset":"","bytopic":"all","outputs":1,"x":670,"y":500,"wires":[["7ae4fd25.a48e94"]]},{"id":"6391af73.47173","type":"trigger","z":"2f176f59.aa012","name":"","op1":"","op2":"Unknown","op1type":"nul","op2type":"str","duration":"300","extend":true,"units":"s","reset":"","bytopic":"all","outputs":1,"x":670,"y":440,"wires":[["7ae4fd25.a48e94"]]},{"id":"962b86a0.887b88","type":"api-current-state","z":"2f176f59.aa012","name":"Side Entry light watchdog","server":"543e2171.45071","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.shelly1_55e7ad","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":390,"y":260,"wires":[["b6756e87.e805e"]]},{"id":"b6756e87.e805e","type":"change","z":"2f176f59.aa012","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"OK","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":260,"wires":[["67d7f28f.aa3d5c"]]},{"id":"67d7f28f.aa3d5c","type":"mqtt out","z":"2f176f59.aa012","name":"Checkin Side Entry","topic":"checkin/sideentry","qos":"","retain":"false","broker":"19f2fec8.28ebf1","x":890,"y":260,"wires":[]},{"id":"1ad10d97.cd2192","type":"mqtt in","z":"2f176f59.aa012","name":"Side Entry light Status","topic":"checkin/carriageside","qos":"2","datatype":"utf8","broker":"19f2fec8.28ebf1","x":400,"y":560,"wires":[["101eb4db.20cbcb"]]},{"id":"101eb4db.20cbcb","type":"trigger","z":"2f176f59.aa012","name":"","op1":"","op2":"Unknown","op1type":"nul","op2type":"str","duration":"300","extend":true,"units":"s","reset":"","bytopic":"all","outputs":1,"x":670,"y":560,"wires":[["7ae4fd25.a48e94"]]},{"id":"b9456d67.5c5d2","type":"api-current-state","z":"2f176f59.aa012","name":"Tori Nightlite watchdog","server":"543e2171.45071","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.shelly1_93f489","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":380,"y":320,"wires":[["31274b31.c864c4"]]},{"id":"31274b31.c864c4","type":"change","z":"2f176f59.aa012","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"OK","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":660,"y":320,"wires":[["ff9686ef.ea3278"]]},{"id":"ff9686ef.ea3278","type":"mqtt out","z":"2f176f59.aa012","name":"Checkin Tori Nightlite","topic":"checkin/torinightlite","qos":"","retain":"false","broker":"19f2fec8.28ebf1","x":900,"y":320,"wires":[]},{"id":"bdd376e7.07e538","type":"mqtt in","z":"2f176f59.aa012","name":"Tori NIghtlite Status","topic":"checkin/torinightlite","qos":"2","datatype":"utf8","broker":"19f2fec8.28ebf1","x":390,"y":620,"wires":[["55b84630.a57608"]]},{"id":"55b84630.a57608","type":"trigger","z":"2f176f59.aa012","name":"","op1":"","op2":"Unknown","op1type":"nul","op2type":"str","duration":"300","extend":true,"units":"s","reset":"","bytopic":"all","outputs":1,"x":670,"y":620,"wires":[["7ae4fd25.a48e94"]]},{"id":"7ae4fd25.a48e94","type":"switch","z":"2f176f59.aa012","name":"Trigger alert","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Unknown","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":890,"y":500,"wires":[["92bc737c.2f031"]]},{"id":"92bc737c.2f031","type":"api-call-service","z":"2f176f59.aa012","name":"HA Notify","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"persistent_notification","service":"create","entityId":"","data":"{\"title\":\"Device failure\",\"message\":\"A Device has failed to checkin. Please review MQTT to check devices\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1060,"y":500,"wires":[[]]},{"id":"5b4c5137.fc98e","type":"switch","z":"6a42a57e.13de6c","name":"Charging/Charged","property":"data.new_state.attributes.batteryLevel","propertyType":"msg","rules":[{"t":"eq","v":"100","vt":"str"},{"t":"lte","v":"10","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":450,"y":1220,"wires":[["f5f7618f.bae26"],["69634555.61773c"]]},{"id":"69634555.61773c","type":"api-call-service","z":"6a42a57e.13de6c","name":"Media Room Charge Controller - On","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.shelly1_c4ec2f","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":770,"y":1240,"wires":[[]]},{"id":"f5f7618f.bae26","type":"api-call-service","z":"6a42a57e.13de6c","name":"Media Room Charge Controller - Off","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.shelly1_c4ec2f","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":770,"y":1180,"wires":[[]]},{"id":"8758ac38.12348","type":"poll-state","z":"6a42a57e.13de6c","name":"Check battery level","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"updateinterval":"30","updateIntervalUnits":"minutes","outputinitially":true,"outputonchanged":false,"entity_id":"sensor.media_room_remote","state_type":"str","halt_if":"","halt_if_type":"num","halt_if_compare":"is","outputs":1,"x":190,"y":1220,"wires":[["5b4c5137.fc98e"]]},{"id":"f34a5cbe.9ef2","type":"server-state-changed","z":"6a42a57e.13de6c","name":"CJ Battery","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.battery_cj","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"20","halt_if_type":"num","halt_if_compare":"lt","outputs":2,"output_only_on_state_change":true,"for":"10","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":160,"y":1340,"wires":[["ce19d31d.a57bd"],[]]},{"id":"4f7dfba.c7b7204","type":"server-state-changed","z":"6a42a57e.13de6c","name":"Jen Battery","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.battery_jen","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"20","halt_if_type":"num","halt_if_compare":"lt","outputs":2,"output_only_on_state_change":true,"for":"10","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":150,"y":1460,"wires":[["d1a59fd7.998ad"],[]]},{"id":"ab15bcb9.a573","type":"server-state-changed","z":"6a42a57e.13de6c","name":"Seb Battery","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.battery_seb","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"20","halt_if_type":"num","halt_if_compare":"lt","outputs":2,"output_only_on_state_change":true,"for":"10","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":150,"y":1580,"wires":[["3c5ea248.89641e"],[]]},{"id":"9105a67e.3e1f98","type":"server-state-changed","z":"6a42a57e.13de6c","name":"Tori Battery","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.battery_tori","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"20","halt_if_type":"num","halt_if_compare":"lt","outputs":2,"output_only_on_state_change":true,"for":"10","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":150,"y":1700,"wires":[["f0756a04.744f78"],[]]},{"id":"d1a59fd7.998ad","type":"api-call-service","z":"6a42a57e.13de6c","name":"HA Notify - Jen Batt","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"persistent_notification","service":"create","entityId":"","data":"{\"title\":\"Battery Low - Jen\",\"message\":\"Battery is getting low ({{payload}}). Please charge\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":490,"y":1440,"wires":[[]]},{"id":"ce19d31d.a57bd","type":"api-call-service","z":"6a42a57e.13de6c","name":"HA Notify - CJ Batt","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"persistent_notification","service":"create","entityId":"","data":"{\"title\":\"Battery Low - CJ\",\"message\":\"Battery is getting low ({{payload}}). Please charge\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":490,"y":1320,"wires":[[]]},{"id":"3c5ea248.89641e","type":"api-call-service","z":"6a42a57e.13de6c","name":"HA Notify - Seb Batt","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"persistent_notification","service":"create","entityId":"","data":"{\"title\":\"Battery Low - Seb\",\"message\":\"Battery is getting low ({{payload}}). Please charge\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":500,"y":1560,"wires":[[]]},{"id":"f0756a04.744f78","type":"api-call-service","z":"6a42a57e.13de6c","name":"HA Notify - Tori Batt","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"persistent_notification","service":"create","entityId":"","data":"{\"title\":\"Battery Low - Tori\",\"message\":\"Battery is getting low ({{payload}}). Please charge\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":490,"y":1680,"wires":[[]]},{"id":"9d289aa2.6940f8","type":"api-call-service","z":"6a42a57e.13de6c","name":"HA Notify - Tori Batt (Dismiss)","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"persistent_notification","service":"dismiss","entityId":"","data":"{\"title\":\"Battery Low - Tori\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":530,"y":1740,"wires":[[]]},{"id":"74fdc833.cb1e68","type":"api-call-service","z":"6a42a57e.13de6c","name":"HA Notify - Seb Batt (Dismiss)","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"persistent_notification","service":"dismiss","entityId":"","data":"{\"title\":\"Battery Low - Seb\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":530,"y":1620,"wires":[[]]},{"id":"eea1fc0e.fb12d","type":"api-call-service","z":"6a42a57e.13de6c","name":"HA Notify - Jen Batt (Dismiss)","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"persistent_notification","service":"dismiss","entityId":"","data":"{\"title\":\"Battery Low - Jen\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":530,"y":1500,"wires":[[]]},{"id":"69b3252d.22ddec","type":"api-call-service","z":"6a42a57e.13de6c","name":"HA Notify - CJ Batt (Dismiss)","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"persistent_notification","service":"dismiss","entityId":"","data":"{\"title\":\"Battery Low - CJ\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":520,"y":1380,"wires":[[]]},{"id":"ef7a0607.f85898","type":"switch","z":"6a42a57e.13de6c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"100","vt":"num"},{"t":"lte","v":"15","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":810,"y":580,"wires":[["6f4cdc84.4b2f64"],["54710b0a.081c74"]]},{"id":"6f4cdc84.4b2f64","type":"api-call-service","z":"6a42a57e.13de6c","name":"Turn off charge controller","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.shelly1_c4ec2f","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1030,"y":540,"wires":[[]]},{"id":"54710b0a.081c74","type":"api-call-service","z":"6a42a57e.13de6c","name":"Turn on charge controller","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.shelly1_c4ec2f","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1030,"y":620,"wires":[[]]},{"id":"e475cbf1.c6039","type":"server-state-changed","z":"6a42a57e.13de6c","name":"Media Room Battery","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.media_room_battery","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"num","halt_if_compare":"is","outputs":1,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":630,"y":580,"wires":[["ef7a0607.f85898"]]},{"id":"8fc70a3c.f67148","type":"server-state-changed","z":"39462126.29efee","name":"On Vacation","server":"543e2171.45071","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.vacation","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":130,"y":80,"wires":[["d468e835.cda368"]]},{"id":"e820d109.c24cc","type":"api-call-service","z":"39462126.29efee","name":"Nightlite On","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.hue_color_lamp_4","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":830,"y":60,"wires":[[]]},{"id":"e060670f.2ebf78","type":"api-call-service","z":"39462126.29efee","name":"Nightlite Off","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.hue_color_lamp_4","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":830,"y":120,"wires":[[]]},{"id":"3c3b45d8.4d763a","type":"switch","z":"39462126.29efee","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":650,"y":80,"wires":[["e820d109.c24cc"],["e060670f.2ebf78"]]},{"id":"df2a275e.a70838","type":"switch","z":"39462126.29efee","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":650,"y":200,"wires":[["3f4d5bb9.7943b4"],["a5fcc08b.919be"]]},{"id":"3f4d5bb9.7943b4","type":"api-call-service","z":"39462126.29efee","name":"Side entry On","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.shelly_shsw_1_55e7ad","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":840,"y":180,"wires":[[]]},{"id":"a5fcc08b.919be","type":"api-call-service","z":"39462126.29efee","name":"Side entry Off","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.shelly_shsw_1_55e7ad","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":840,"y":240,"wires":[[]]},{"id":"9fb81a0a.73e078","type":"switch","z":"39462126.29efee","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":650,"y":360,"wires":[["c123e5f7.0d20f8","a3622823.830ba8"],["73d2a25b.1f130c","6ddba17b.68ab4"]]},{"id":"c123e5f7.0d20f8","type":"api-call-service","z":"39462126.29efee","name":"CJ - WakeUp","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.cj_alarm_running","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":830,"y":300,"wires":[[]]},{"id":"73d2a25b.1f130c","type":"api-call-service","z":"39462126.29efee","name":"CJ - WakeUp","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.cj_alarm_running","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":830,"y":420,"wires":[[]]},{"id":"a3622823.830ba8","type":"api-call-service","z":"39462126.29efee","name":"Jen - WakeUp","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_on","entityId":"input_boolean.jen_alarm_running","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":840,"y":360,"wires":[[]]},{"id":"6ddba17b.68ab4","type":"api-call-service","z":"39462126.29efee","name":"Jen - WakeUp","server":"543e2171.45071","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.jen_alarm_running","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":840,"y":480,"wires":[[]]},{"id":"d468e835.cda368","type":"api-current-state","z":"39462126.29efee","name":"Nobody home","server":"543e2171.45071","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"input_boolean.occupied","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":200,"y":200,"wires":[["3b9b6505.1545da","47db5151.097bd","7d706202.e3605c"],[]]},{"id":"3b9b6505.1545da","type":"vacation-timer","z":"39462126.29efee","name":"Vacation timer (nightlites)","lat":"42.640212","lon":"-83.136262","turnOffOnDaysOff":true,"midnightSchedule":true,"onTime":"00:00","randMinutes":"30","offTime":"14:00","randOffMinutes":"0","minOnHours":"0","minOnMinutes":"10","maxOnHours":"0","maxOnMinutes":"15","stopTab":"tab-1","onPayloadType":"str","onPayloadVal":"on","onTopicVal":"","offPayloadType":"str","offPayloadVal":"off","offTopicVal":"","suspended":true,"disableMax":false,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"x":450,"y":80,"wires":[["3c3b45d8.4d763a"]]},{"id":"47db5151.097bd","type":"vacation-timer","z":"39462126.29efee","name":"Vacation timer (sunset)","lat":"42.640212","lon":"-83.136262","turnOffOnDaysOff":true,"midnightSchedule":true,"onTime":"sunset","randMinutes":"30","offTime":"14:00","randOffMinutes":"0","minOnHours":"0","minOnMinutes":"5","maxOnHours":"0","maxOnMinutes":"10","stopTab":"tab-1","onPayloadType":"str","onPayloadVal":"on","onTopicVal":"","offPayloadType":"str","offPayloadVal":"off","offTopicVal":"","suspended":true,"disableMax":false,"sun":true,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":true,"x":440,"y":200,"wires":[["df2a275e.a70838"]]},{"id":"7d706202.e3605c","type":"vacation-timer","z":"39462126.29efee","name":"Vacation timer (morning)","lat":"42.640212","lon":"-83.136262","turnOffOnDaysOff":true,"midnightSchedule":true,"onTime":"sunrise","randMinutes":"30","offTime":"14:00","randOffMinutes":"0","minOnHours":"0","minOnMinutes":"15","maxOnHours":"0","maxOnMinutes":"20","stopTab":"tab-1","onPayloadType":"str","onPayloadVal":"on","onTopicVal":"","offPayloadType":"str","offPayloadVal":"off","offTopicVal":"","suspended":true,"disableMax":false,"sun":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":false,"x":450,"y":360,"wires":[["9fb81a0a.73e078"]]}]