@123 Thank you for spending time with me to get this automation working on my setup. I believe something still isn’t quite right. The “open door” sections seems to be working properly but on the “closed but unlocked”, I seem to be getting push notifications indicating the locking of a door but the list is blank. The last instance, I got a push notification that said
“…Locked the following:” with no doors listed.
I ran a second test with 2 doors unlocked and it produced the below (no doors listed but “-” on the second line.
“…Locked the following:
Thank you for any guidance you can give. I thought we had it all taken care of but it seems there’s still a little bit of an issue floating around. I am using your edited code post from post 30. Thank you @123 for the time you have spent with me, I’m sorry we keep running into issues.
Currently, the front door is unlocked and closed in my home and below is what the template editor is showing for what is called the closed_doors_unlocked variable in the automation.
Where I’m not real good at this yet. I don’t know what the issue could be.
Also, this is a secondary thing but I’m starting to get the sense that the unlocked door list is going to say.
Locked the following:
Front Door Lock
Back Door Lock
Is there a way we can get it to say?
Locked the following:
And definitely buying you a coffee, because I feel like a royal pain. I hate asking for help but I’m just not functional yet on this platform. Thank you for helping me again.
So below is my attempt at fixing the door listing on the “closed but unlocked”
I keep getting a "UndefinedError: ‘str object’ has no attribute ‘state’
The error popped up after typing in the last block of code on the screen. (It has something to do with regex_replace outputting a string rather than an object I believe but I don’t know what to do with it.)
Also, I ended up getting the blank notification fixed with the below fix. I don’t like that I had to do it this way and I imagine you will be able to find the original issue (the hope is that I don’t have to use my “hack code” below.
Essentially I ended up adding another variable to get myself to the name attribute and added that to the notification in the actions. Something tells me I shouldn’t have to do that though and you will catch the actual problem in the original code. The changes are highlighted below (these can be compared to your original code in post 30)