@Keki I have Danalock on ZHA via a Conbee II. To get battery state and lock state I pulled the battery from the lock, put them back in and reset the link to HA from the Danalock app. Worked like a charm.
I found the Danalock app just doesn’t give much control so I have rebuilt control in NodeRed and disabled auto unlock from Danalock and setup notifications via Companion App. The lock now works just how I want it to. If anyone is interested:
[{"id":"48bbd268.e51fe4","type":"tab","label":"Danalock","disabled":false,"info":""},{"id":"1c8ae54c.e53413","type":"group","z":"48bbd268.e51fe4","name":"Door Unlocked, Opened, Closed and Lock","style":{"label":true,"color":"#000000"},"nodes":["8c539b86.df5588","fb65469f.14fd2","a528c20e.71ce8","f8f78f36.e7a708","3c8405b5.75e482","1d6f8c96.83c22b","b5f4b2b.2428e5","71be1352.b56944"],"x":34,"y":1179,"w":1532,"h":142},{"id":"22ce619e.5c8996","type":"group","z":"48bbd268.e51fe4","name":"Send iOS Push Notification - Failed To Lock","style":{"fill":"#addb7b","label":true,"color":"#000000"},"nodes":["f4583c67.7efc18","b9439249.d0e858","fa592782.15e12"],"x":1594,"y":1219,"w":692,"h":82},{"id":"386c77db.fe12d","type":"group","z":"48bbd268.e51fe4","name":"Cheryl Lock/Unlock","style":{"fill":"#ff7f7f","label":true,"color":"#000000"},"nodes":["4931034d.6c664c","fa4facac.69e8e8","aa05f482.c8df5","f8c8be87.ec239","8f2c497f.f196d8","67b6b09e.cc13c","74184c92.ada92c","3b70cd11.479612","7ee2cb43.4efe9c","75d1d7e8.2e6ec","d58de43b.fc9108"],"x":34,"y":319,"w":1572,"h":242},{"id":"587ec5cd.31bd2c","type":"group","z":"48bbd268.e51fe4","name":"James Lock/Unlock","style":{"fill":"#ff7f7f","label":true,"color":"#000000"},"nodes":["7b2a46d5.3c702","300a76e9.48a96a","aae03745.2c5b2","6d9bc30e.301184","c01c67a0.f3aa9","8b0c9caf.68f5f8","59f6d36b.4b14cc","df7a57eb.03483","fbae4b12.f63148","f8574a6a.61f4a8","aa885953.460048","689381bb.34abb","a3379816.d3d738","cfbc6294.6d2ce"],"x":34,"y":19,"w":1632,"h":242},{"id":"eb3e7517.630068","type":"group","z":"48bbd268.e51fe4","name":"Send iOS Push Notification - Lock and Unlock Status","style":{"fill":"#addb7b","label":true,"color":"#000000"},"nodes":["20b990fe.068568","cb163531.d23308","1851c9f8.07e88e","9cc1ace.1ca6cd","18776524.8f4353","d30a09b0.de6a68","284eb9a6.7aa8ee","a2ed941e.da0a3","a10871ff.157138"],"x":54,"y":1559,"w":1192,"h":182},{"id":"f68f9928.e9e058","type":"group","z":"48bbd268.e51fe4","name":"Door Unlocked, Left Unlocked","style":{"label":true,"color":"#000000"},"nodes":["ec849ce9.823278","518de0a4.be93","e0036b68.a65b7","4384adbd.fa9a2c","b8770ca.81a70f","4da9b7b0.e911f8","569d0765.dcc62","812ba674.19d34"],"x":34,"y":1359,"w":1392,"h":162},{"id":"c01c67a0.f3aa9","type":"delay","z":"48bbd268.e51fe4","g":"587ec5cd.31bd2c","name":"","pauseType":"delay","timeout":"30","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":580,"y":120,"wires":[[]]},{"id":"f8574a6a.61f4a8","type":"server-state-changed","z":"48bbd268.e51fe4","g":"587ec5cd.31bd2c","name":"James","server":"9f14629c.16082","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.james_present","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":130,"y":160,"wires":[[]]},{"id":"689381bb.34abb","type":"server-state-changed","z":"48bbd268.e51fe4","g":"587ec5cd.31bd2c","name":"James Wi-Fi Amplifi","server":"9f14629c.16082","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.amplifi_james_iphone_12_pro_max","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":150,"y":60,"wires":[[]]},{"id":"a3379816.d3d738","type":"server-state-changed","z":"48bbd268.e51fe4","g":"587ec5cd.31bd2c","name":"James Wifi Companion App","server":"9f14629c.16082","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.james_iphone_12_pro_max_app_ssid","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":180,"y":100,"wires":[[]]},{"id":"cfbc6294.6d2ce","type":"switch","z":"48bbd268.e51fe4","g":"587ec5cd.31bd2c","name":"Arriving or Leaving","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"JandC","vt":"str"},{"t":"eq","v":"Not Connected","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":470,"y":60,"wires":[[],[]]},{"id":"4931034d.6c664c","type":"server-state-changed","z":"48bbd268.e51fe4","g":"386c77db.fe12d","name":"Cheryl Home Switch","server":"9f14629c.16082","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.cheryl_present","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":150,"y":480,"wires":[[]]},{"id":"fa4facac.69e8e8","type":"switch","z":"48bbd268.e51fe4","g":"386c77db.fe12d","name":"Arriving or Leaving","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":480,"wires":[["8f2c497f.f196d8"],["aa05f482.c8df5"]]},{"id":"aa05f482.c8df5","type":"api-call-service","z":"48bbd268.e51fe4","g":"386c77db.fe12d","name":"Cheryl Leaving Lock the door","server":"9f14629c.16082","version":1,"debugenabled":false,"service_domain":"lock","service":"lock","entityId":"lock.front_door_lock","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":630,"y":520,"wires":[[]]},{"id":"f8c8be87.ec239","type":"api-call-service","z":"48bbd268.e51fe4","g":"386c77db.fe12d","name":"Unlock the door","server":"9f14629c.16082","version":1,"debugenabled":false,"service_domain":"lock","service":"unlock","entityId":"lock.front_door_lock","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":740,"y":420,"wires":[["74184c92.ada92c"]]},{"id":"8f2c497f.f196d8","type":"delay","z":"48bbd268.e51fe4","g":"386c77db.fe12d","name":"","pauseType":"delay","timeout":"30","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":560,"y":420,"wires":[["f8c8be87.ec239"]]},{"id":"67b6b09e.cc13c","type":"delay","z":"48bbd268.e51fe4","g":"386c77db.fe12d","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1480,"y":360,"wires":[["3b70cd11.479612"]]},{"id":"74184c92.ada92c","type":"ha-wait-until","z":"48bbd268.e51fe4","g":"386c77db.fe12d","name":"Wait Until Front Door Open","server":"9f14629c.16082","outputs":2,"entityId":"binary_sensor.front_door_open_close_sensor","entityIdFilterType":"exact","property":"state","comparator":"is","value":"on","valueType":"str","timeout":"10","timeoutType":"num","timeoutUnits":"minutes","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":980,"y":400,"wires":[["7ee2cb43.4efe9c"],["3b70cd11.479612"]]},{"id":"3b70cd11.479612","type":"api-call-service","z":"48bbd268.e51fe4","g":"386c77db.fe12d","name":"Cheryl Ariving Lock the door","server":"9f14629c.16082","version":1,"debugenabled":false,"service_domain":"lock","service":"lock","entityId":"lock.front_door_lock","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1460,"y":480,"wires":[[]]},{"id":"7ee2cb43.4efe9c","type":"ha-wait-until","z":"48bbd268.e51fe4","g":"386c77db.fe12d","name":"Wait Until Front Door Closed","server":"9f14629c.16082","outputs":1,"entityId":"binary_sensor.front_door_open_close_sensor","entityIdFilterType":"exact","property":"payload","comparator":"is","value":"off","valueType":"str","timeout":"0","timeoutType":"num","timeoutUnits":"minutes","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":1260,"y":360,"wires":[["67b6b09e.cc13c"]]},{"id":"16e1033e.0c85b5","type":"change","z":"48bbd268.e51fe4","name":"Stop timer","rules":[{"t":"delete","p":"payload","pt":"msg"},{"t":"set","p":"payload","pt":"msg","to":"reset","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":280,"wires":[["74184c92.ada92c","59f6d36b.4b14cc"]]},{"id":"892366c0.1b58c","type":"inject","z":"48bbd268.e51fe4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":450,"y":280,"wires":[["16e1033e.0c85b5"]]},{"id":"75d1d7e8.2e6ec","type":"inject","z":"48bbd268.e51fe4","g":"386c77db.fe12d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":1160,"y":480,"wires":[["3b70cd11.479612"]]},{"id":"8c539b86.df5588","type":"server-state-changed","z":"48bbd268.e51fe4","g":"1c8ae54c.e53413","name":"Danalock Unlocked","server":"9f14629c.16082","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"lock.front_door_lock","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"unlocked","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":150,"y":1220,"wires":[["1d6f8c96.83c22b","f8f78f36.e7a708"],[]]},{"id":"fb65469f.14fd2","type":"api-call-service","z":"48bbd268.e51fe4","g":"1c8ae54c.e53413","name":"Lock the door","server":"9f14629c.16082","version":1,"debugenabled":false,"service_domain":"lock","service":"lock","entityId":"lock.front_door_lock","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1080,"y":1220,"wires":[["b5f4b2b.2428e5"]]},{"id":"a528c20e.71ce8","type":"delay","z":"48bbd268.e51fe4","g":"1c8ae54c.e53413","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":900,"y":1220,"wires":[["fb65469f.14fd2"]]},{"id":"f8f78f36.e7a708","type":"ha-wait-until","z":"48bbd268.e51fe4","g":"1c8ae54c.e53413","name":"Wait until door is opened","server":"9f14629c.16082","outputs":1,"entityId":"binary_sensor.front_door_open_close_sensor","entityIdFilterType":"exact","property":"state","comparator":"is","value":"on","valueType":"str","timeout":0,"timeoutType":"num","timeoutUnits":"seconds","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":430,"y":1220,"wires":[["3c8405b5.75e482"]]},{"id":"3c8405b5.75e482","type":"ha-wait-until","z":"48bbd268.e51fe4","g":"1c8ae54c.e53413","name":"Wait until door is closed","server":"9f14629c.16082","outputs":1,"entityId":"binary_sensor.front_door_open_close_sensor","entityIdFilterType":"exact","property":"state","comparator":"is","value":"off","valueType":"str","timeout":0,"timeoutType":"num","timeoutUnits":"seconds","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":690,"y":1220,"wires":[["a528c20e.71ce8"]]},{"id":"20b990fe.068568","type":"debug","z":"48bbd268.e51fe4","g":"eb3e7517.630068","name":"Full debug to find attributes","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":360,"y":1700,"wires":[]},{"id":"cb163531.d23308","type":"switch","z":"48bbd268.e51fe4","g":"eb3e7517.630068","name":"Change by device","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"unlocked","vt":"str"},{"t":"eq","v":"locked","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":410,"y":1600,"wires":[["18776524.8f4353"],["d30a09b0.de6a68"]]},{"id":"1851c9f8.07e88e","type":"simpletime","z":"48bbd268.e51fe4","g":"eb3e7517.630068","name":"Time Now","mydate":true,"myymd":true,"myyear":true,"mymonth":true,"mymonthn":true,"mydom":true,"mydoy":true,"myday":true,"myhourpm":true,"myhour":true,"mytime":true,"mytimes":true,"myminute":true,"myminutes":true,"mysecond":true,"mymillis":true,"myepoch":true,"myrawdate":true,"mypm":true,"x":800,"y":1600,"wires":[["284eb9a6.7aa8ee"]]},{"id":"9cc1ace.1ca6cd","type":"simpletime","z":"48bbd268.e51fe4","g":"eb3e7517.630068","name":"Time Now","mydate":true,"myymd":true,"myyear":true,"mymonth":true,"mymonthn":true,"mydom":true,"mydoy":true,"myday":true,"myhourpm":true,"myhour":true,"mytime":true,"mytimes":true,"myminute":true,"myminutes":true,"mysecond":true,"mymillis":true,"myepoch":true,"myrawdate":true,"mypm":true,"x":800,"y":1660,"wires":[["a2ed941e.da0a3"]]},{"id":"18776524.8f4353","type":"api-call-service","z":"48bbd268.e51fe4","g":"eb3e7517.630068","name":"Increase by 1","server":"9f14629c.16082","version":1,"debugenabled":false,"service_domain":"counter","service":"increment","entityId":"counter.iosbadgecount","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":620,"y":1600,"wires":[["1851c9f8.07e88e"]]},{"id":"d30a09b0.de6a68","type":"api-call-service","z":"48bbd268.e51fe4","g":"eb3e7517.630068","name":"Increase by 1","server":"9f14629c.16082","version":1,"debugenabled":false,"service_domain":"counter","service":"increment","entityId":"counter.iosbadgecount","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":620,"y":1660,"wires":[["9cc1ace.1ca6cd"]]},{"id":"284eb9a6.7aa8ee","type":"api-call-service","z":"48bbd268.e51fe4","g":"eb3e7517.630068","name":"Send Notification Danalock Unlocked","server":"9f14629c.16082","version":1,"debugenabled":false,"service_domain":"notify","service":"all_devices","entityId":"","data":"{\"title\":\"Danalock Unlocked\",\"message\":\"Front door unlocked - {{myhourpm}}:{{myminute}}.{{mysecond}} {{mypm}} {{mydom}}/{{mymonthn}}/{{myyear}}\",\"data\":{\"push\":{\"thread-id\":\"danalock_unlocked\",\"badge\":\"{{states.counter.iosbadgecount.state}}\"}}}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1070,"y":1600,"wires":[[]]},{"id":"1d6f8c96.83c22b","type":"debug","z":"48bbd268.e51fe4","g":"1c8ae54c.e53413","name":"Unlock Debug","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":380,"y":1280,"wires":[]},{"id":"a2ed941e.da0a3","type":"api-call-service","z":"48bbd268.e51fe4","g":"eb3e7517.630068","name":"Send Notification Danalock Locked","server":"9f14629c.16082","version":1,"debugenabled":false,"service_domain":"notify","service":"all_devices","entityId":"","data":"{\"title\":\"Danalock Locked\",\"message\":\"Front door locked - {{myhourpm}}:{{myminute}}.{{mysecond}} {{mypm}} {{mydom}}/{{mymonthn}}/{{myyear}}\",\"data\":{\"push\":{\"thread-id\":\"danalock_locked\",\"badge\":\"{{states.counter.iosbadgecount.state}}\"}}}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1060,"y":1660,"wires":[[]]},{"id":"a10871ff.157138","type":"server-state-changed","z":"48bbd268.e51fe4","g":"eb3e7517.630068","name":"Danalock Changed","server":"9f14629c.16082","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"lock.front_door_lock","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":170,"y":1640,"wires":[["20b990fe.068568","cb163531.d23308"]]},{"id":"b5f4b2b.2428e5","type":"delay","z":"48bbd268.e51fe4","g":"1c8ae54c.e53413","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1240,"y":1220,"wires":[["71be1352.b56944"]]},{"id":"71be1352.b56944","type":"api-current-state","z":"48bbd268.e51fe4","g":"1c8ae54c.e53413","name":"Check Locked Status","server":"9f14629c.16082","version":1,"outputs":2,"halt_if":"unlocked","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"lock.front_door_lock","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1440,"y":1280,"wires":[["a528c20e.71ce8","b9439249.d0e858"],[]]},{"id":"f4583c67.7efc18","type":"simpletime","z":"48bbd268.e51fe4","g":"22ce619e.5c8996","name":"Time Now","mydate":true,"myymd":true,"myyear":true,"mymonth":true,"mymonthn":true,"mydom":true,"mydoy":true,"myday":true,"myhourpm":true,"myhour":true,"mytime":true,"mytimes":true,"myminute":true,"myminutes":true,"mysecond":true,"mymillis":true,"myepoch":true,"myrawdate":true,"mypm":true,"x":1880,"y":1260,"wires":[["fa592782.15e12"]]},{"id":"b9439249.d0e858","type":"api-call-service","z":"48bbd268.e51fe4","g":"22ce619e.5c8996","name":"Increase by 1","server":"9f14629c.16082","version":1,"debugenabled":false,"service_domain":"counter","service":"increment","entityId":"counter.iosbadgecount","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1700,"y":1260,"wires":[["f4583c67.7efc18"]]},{"id":"fa592782.15e12","type":"api-call-service","z":"48bbd268.e51fe4","g":"22ce619e.5c8996","name":"Send Failed To Lock Notification","server":"9f14629c.16082","version":1,"debugenabled":false,"service_domain":"notify","service":"all_devices","entityId":"","data":"{\"title\":\"Danalock Failed Lock\",\"message\":\"Front door failed to lock - {{myhourpm}}:{{myminute}}.{{mysecond}} {{mypm}} {{mydom}}/{{mymonthn}}/{{myyear}}\",\"data\":{\"push\":{\"thread-id\":\"danalock_failed_lock\",\"badge\":\"{{states.counter.iosbadgecount.state}}\"}}}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":2130,"y":1260,"wires":[[]]},{"id":"d58de43b.fc9108","type":"server-state-changed","z":"48bbd268.e51fe4","g":"386c77db.fe12d","name":"Cheryl Wi-Fi Connection","server":"9f14629c.16082","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.amplifi_cheryl_iphone_12_pro_max","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":170,"y":400,"wires":[[]]},{"id":"ec849ce9.823278","type":"server-state-changed","z":"48bbd268.e51fe4","g":"f68f9928.e9e058","name":"Danalock Unlocked","server":"9f14629c.16082","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"lock.front_door_lock","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"unlocked","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":150,"y":1420,"wires":[["e0036b68.a65b7","4da9b7b0.e911f8"],[]]},{"id":"518de0a4.be93","type":"api-call-service","z":"48bbd268.e51fe4","g":"f68f9928.e9e058","name":"Lock the door","server":"9f14629c.16082","version":1,"debugenabled":false,"service_domain":"lock","service":"lock","entityId":"lock.front_door_lock","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":980,"y":1400,"wires":[["4384adbd.fa9a2c"]]},{"id":"e0036b68.a65b7","type":"debug","z":"48bbd268.e51fe4","g":"f68f9928.e9e058","name":"Unlock Debug","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":380,"y":1480,"wires":[]},{"id":"4384adbd.fa9a2c","type":"delay","z":"48bbd268.e51fe4","g":"f68f9928.e9e058","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1160,"y":1400,"wires":[["b8770ca.81a70f"]]},{"id":"b8770ca.81a70f","type":"api-current-state","z":"48bbd268.e51fe4","g":"f68f9928.e9e058","name":"Check Locked Status","server":"9f14629c.16082","version":1,"outputs":2,"halt_if":"unlocked","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"lock.front_door_lock","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":1300,"y":1480,"wires":[["812ba674.19d34"],[]]},{"id":"4da9b7b0.e911f8","type":"delay","z":"48bbd268.e51fe4","g":"f68f9928.e9e058","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":360,"y":1400,"wires":[["569d0765.dcc62"]]},{"id":"569d0765.dcc62","type":"api-current-state","z":"48bbd268.e51fe4","g":"f68f9928.e9e058","name":"Door status closed?","server":"9f14629c.16082","version":1,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"binary_sensor.front_door_open_close_sensor","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":580,"y":1400,"wires":[["812ba674.19d34"],[]]},{"id":"812ba674.19d34","type":"delay","z":"48bbd268.e51fe4","g":"f68f9928.e9e058","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":800,"y":1400,"wires":[["518de0a4.be93"]]},{"id":"7b2a46d5.3c702","type":"server-state-changed","z":"48bbd268.e51fe4","g":"587ec5cd.31bd2c","name":"James Home Switch","server":"9f14629c.16082","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.hk_presence_james","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":150,"y":220,"wires":[["aa885953.460048","300a76e9.48a96a"]]},{"id":"300a76e9.48a96a","type":"switch","z":"48bbd268.e51fe4","g":"587ec5cd.31bd2c","name":"Arriving or Leaving","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"connected","vt":"str"},{"t":"eq","v":"disconnected","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":390,"y":180,"wires":[["6d9bc30e.301184"],["aae03745.2c5b2"]]},{"id":"aae03745.2c5b2","type":"api-call-service","z":"48bbd268.e51fe4","g":"587ec5cd.31bd2c","name":"James Leaving Lock the door","server":"9f14629c.16082","version":1,"debugenabled":false,"service_domain":"lock","service":"lock","entityId":"lock.front_door_lock","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":650,"y":220,"wires":[[]]},{"id":"6d9bc30e.301184","type":"api-call-service","z":"48bbd268.e51fe4","g":"587ec5cd.31bd2c","name":"Unlock the door","server":"9f14629c.16082","version":1,"debugenabled":false,"service_domain":"lock","service":"unlock","entityId":"lock.front_door_lock","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":760,"y":120,"wires":[["59f6d36b.4b14cc"]]},{"id":"8b0c9caf.68f5f8","type":"delay","z":"48bbd268.e51fe4","g":"587ec5cd.31bd2c","name":"","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1500,"y":60,"wires":[["df7a57eb.03483"]]},{"id":"59f6d36b.4b14cc","type":"ha-wait-until","z":"48bbd268.e51fe4","g":"587ec5cd.31bd2c","name":"Wait Until Front Door Open","server":"9f14629c.16082","outputs":2,"entityId":"binary_sensor.front_door_open_close_sensor","entityIdFilterType":"exact","property":"state","comparator":"is","value":"on","valueType":"str","timeout":"10","timeoutType":"num","timeoutUnits":"minutes","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":1000,"y":100,"wires":[["fbae4b12.f63148"],["df7a57eb.03483"]]},{"id":"df7a57eb.03483","type":"api-call-service","z":"48bbd268.e51fe4","g":"587ec5cd.31bd2c","name":"James Ariving Lock the door","server":"9f14629c.16082","version":1,"debugenabled":false,"service_domain":"lock","service":"lock","entityId":"lock.front_door_lock","data":"","dataType":"jsonata","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1520,"y":180,"wires":[[]]},{"id":"fbae4b12.f63148","type":"ha-wait-until","z":"48bbd268.e51fe4","g":"587ec5cd.31bd2c","name":"Wait Until Front Door Closed","server":"9f14629c.16082","outputs":1,"entityId":"binary_sensor.front_door_open_close_sensor","entityIdFilterType":"exact","property":"payload","comparator":"is","value":"off","valueType":"str","timeout":"0","timeoutType":"num","timeoutUnits":"minutes","entityLocation":"","entityLocationType":"none","checkCurrentState":true,"blockInputOverrides":true,"x":1280,"y":60,"wires":[["8b0c9caf.68f5f8"]]},{"id":"aa885953.460048","type":"debug","z":"48bbd268.e51fe4","g":"587ec5cd.31bd2c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":350,"y":140,"wires":[]},{"id":"9f14629c.16082","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]