I initially posted a lock manager package back in Nov of 2018. It was something I had created for myself that I wanted to share with others. I built it piece by piece over months by reading through other peoples automations, sensors, scripts, and packages. During those months I learned a lot about how HA worked not just with locks and zwave, but much much more. I posted to github to share, but ultimately it was my package that I was using for myself. When I posted it, I expected that the people using the package would also have been spending time learning HA, and already have a fair understanding of how yaml works, how zwave works, etc. I expected that if you wanted to name your lock differently, that you would, you’d look through the yaml, and make the changes as needed. I tried to provide detailed comments, to make it easier. What I’ve noticed since this was posted is that most of the requests for assistance were actually yaml formatting, or zwave network issues. I just wanted to start with this comment to hopefully help new users who may come across this package.
Here are a few things to know before you get started
- This lock package does not make your lock work on not work. It helps you to set codes into your lock, manage settings, etc. Everything this does can be done without this package. Home Assistant and Zwave are what makes your lock work.
- Before you even get started with this package, I highly recommend. Getting your lock added Securely, see if you can lock and unlock it via Home assistant (no automations, needed, just find the lock entity.)
- if you only have one or two zwave devices and the lock is one of those, and you find that your lock is not as responsive as it should be. This (or any package) will not make it work better. Sorry about that, getting a decent zwave mesh really makes a huge difference. Does not matter if it’s 6 feet from the zwave stick. if it does not work, nothing in HA will make it work better.
- If you get errors about @data or triggers, etc. It’s a yaml formatting error. Usually it’s spacing somewhere. If you made no changes at all this package should and usually does work, and should have have formatting errors.
- My package specifically requires you to rename a few of your entities. If you already have them added, and dont feel like renaming them, no problem. Have a look at the yaml, and make the changes as needed. There is a good amount of templating, which is usually the most likely cause of something breaking. But I tried my best to comment on where to make changes is needed.
Ok, now on to the details.
Before you get started make sure to have the following integrations and lovelace items configured and working
HACS (highly recommended)
- atomic-calendar (not required for this to work, just a nice way to see a lock schedule)
- Google Calendar - https://www.home-assistant.io/integrations/calendar.google/
- Pushover - https://www.home-assistant.io/integrations/pushover/
- packages - https://www.home-assistant.io/docs/configuration/packages/#create-a-packages-folder
After you get to the package installed and working you can use the lovelace template as a new dashboard (recommended) If you only have one or two locks (or have named them differently) you may have to remove a few refrences to entities that don’t exist
Configuration --> lovelace dashboards Add a new dashboard, then open that dashboard in raw and copy/paste the lovelace.txt (in my github)
OK now to the lock manager details
You can find my packages in my repository
Everyone needs the
and at least one other lock package
for example. I have three lock packages in the github reporitory. For me Front, back and garage door.
The garage door package is a little different from the other two as it was made for an schlage FE599 and they dont work exactly the same. If you dont have an FE599, I would not use this package.
So here are some details as to the capabilities of this package.
You’ll find several packges in the community. We all do pretty much the same thing. Set codes, clear codes, schedule codes, notify people, etc. This is no different.
I will start off with the basics. Setting user codes
Here is an example of what a slot looks like in lovelace before any data is entered
Once you enter a name and a code, you’ll be presented with additional options (conditional lovelace card does the work here)
Select your access schedule. The options are “Always or Scheduled”
Once you select the schedule (let’s start with Always) the code will load into the door lock that you turn on. When you turn off a door lock the code will be removed. So when you first start all locks will be off. Turn them on and the code get sent to the door. Note: Home assistant does not know what the codes are in the lock. It cannot read or pull existing codes. In this case it has an input text set as a code, it sends that text to the door. If you sent a code and then deleted home assistant or this package, the codes would still be there.
If you click on the enable notifications, you will get a notification when that code slot is used to unlock the door.
If you click on the delete code slot once the “lock” icon will disappear. Click on it a second time and it will clear the name and code from HA, and also clear the code from the lock.
At the bottom of the lovelace panel there are zwave options you can set and configure. These options are for schlage only. If you have a different lock, just remove the lovelace card.
Ok lets talk about scheduled codes. I chose to use google calendar intergration. What I really liked about using google calendar was the flexibility. Basically whatever you can set as a google calendar schedule you can have for your lock schedule.
I personally have a google account dedicated to Home Assistant which makes it easy to keep seperate from my personal account. But also I created a second calendar in my account just for lock codes. I have put a template for HA for my calendar to help get started
Basically it works like this
Create a calendar event. Name of the event is the code slot you want to schedule
Select Scheduled in the HA lovelace front end and you’ll see something like this
For the scheduled events I also added a feature to delete when done. Just add the word delete in the description of the event. When the event ends, HA will clear the code and name from HA and the lock. This might be useful for a weekly rental. Maybe set a code for a full week, then when the event ends, it will be cleared, Or maybe you need to let someone in for a day, multiple times, but never again.
Speaking of deleting codes. There are also 3 one time use slots. They are pretty self explanatory . Enable the code. A random number will be generated, If you dont want to use that, change to what you want. Turn on the switch for the lock or locks you want and when the code is used on any of the enabled doors, it will be deleted from all doors.
Much of this is pretty simlimar to my old lock package
Most of the changes here are the calendar and a good amount of lovelace improvements to make it prettier
I hope this is useful to others. Enjoy.