KeyMaster Z-Wave lock manager and scheduler

Interesting, thanks for the confirmation. Perhaps I will need to reset the locks at some point and try again.

I just migrated mine over also and it seems to work even with S0 legacy. I just did the auto migration and the lock seemed to come over and work for everything accept loosing the 2 senors that are present when using the old Zwave integration.

Itā€™s likely they are not lost and just disabled by default.

I had both lock-manager and keymaster installed but neither really worked for me. I wanted to fully uninstall and maybe start over but after removing both integrations and restarting many times I still have lots of left over automations and helpers. I tried to manually delete them from core.entity_registry, core.restore_state but they are still there. Any ideas on how I can fully clean this up?

Did you check in packages ?

Yes it is empty but I still have all of these leftover automations and helpers and I donā€™t know how to delete them. Watching HA restart on the automations page I see all of my own automations but then at the last moment before HA finishes initializing all these other automations reappear. Itā€™s loading them from somewhere I just donā€™t know where and searching through the files hasnā€™t turned up much. I even tried starting with a new database and no luck.

I had the same issue when experimenting with KeyMaster. The entities it creates do not go away when you remove the integration and relevant packages. After a restart, they are all there as Unavailable. Each of them let me Remove Entity, but ya, it was one at a time. There were 100s from KeyMaster. I have an auto-entities card that shows all entities that are Unavailable. This at least paired the list down for me. Then I had to manually click into each one, click remove, and confirm.

How did you manually click and delete each individually. Mine are greyed out in the Automations page and then in developer tools, I donā€™t see a delete button. Am I looking in the wrong place?
Good idea on the auto-entities card.

Go to your configuration and click Entities at the top.
Sort by Status on the far right, then you can find Unavailable and Restored entities and check the boxes and press the Remove Selected button at the top to nuke them in a single go.

Hah. Thatā€™s definitely an easier way. Guess I missed that display even being a thing.

There are some entities that will let me select them in that list but others (the ones I really want to delete) wonā€™t even allow me to select). Even if I hit the top checkbox to select all it skips over these Keymaster remnants. Also, even if that worked it would only help with entities, what about automations and helpers?

Did remove the integration by using the Delete option from the menu?
image

Yes, the integration is no longer installed. I canā€™t see it anywhere but lots of leftover entities, automations, helpers, etc.

Odd, itā€™s coded to cleanup those entities on removal.

Is there a way for me to manually run those cleanup tasks/scripts? Iā€™m willing to put in the work, Iā€™d just a clean setup.

Not that I am aware of.

Can anyone tell me how these things get loaded back into HA? Iā€™ve searched all files and done cleanup of core.entity_registry and core.restore_state files. Now when I grep I only find them in the database folder. Iā€™ve tried to delete the database to start fresh and they still come back. This tells me something is loading them back into the database, I just donā€™t know where to look to clean these up?

Can confirm cleanup doesnt work. I just removed two instances of keymaster and restarted Home Assistant after the script said it was done. After the restart, filtering entities to ā€œkeymasterā€ resulted in 162 unavailable entities that have to be removed. Another 20 or so other entities as well.

Hi, Did you find a fix for this?

Iā€™m not sure what happened, but I had everything working well on a brand new HA install a couple days ago. I have seven locks paired, but had only setup 3 of them in keymaster. Today I added the 4th lock to keymaster with the only difference being I set it as a child of one of the keymaster configured locks. This screwed everything up. Now when I go to my lovelace dashboard tabs for each lock, every slot has two errors:

Entity not available: input_text_front_lock_name_*
Entity not available: input_text_front_lock_pin_*

One lock has 15 slots, the other two have 8 slots. All 31 slots are missing those two entities. Searching for them in Configure ā†’ Entities doesnā€™t find any of them. But there are tons of related input_boolean_* and input_datetime_* entities.

The only integrations Iā€™ve added to HA is zwavejs, hacs, and keymaster.

Any idea how I get my input_text entities back and my dashboard working again? This is installed at an Airbnb with guests in some of the units, so Iā€™m hoping to solve this without needing to access their rooms, do hard resets, or disturb working lock codes. Note that when this problem happened, none of the existing lock codes were changed or removed.

Logs are reporting errors like this:

Error while executing automation automation.keymaster_override_parent_back_lock_9_state_change: Template rendered invalid entity IDs: ['automation.copy_Front Lock_name_back_lock_9', 'automation.copy_Front Lock_pin_back_lock_9', 'automation.copy_Front Lock_enabled_back_lock_9', 'automation.copy_Front Lock_notify_back_lock_9', 'automation.copy_Front Lock_reset_back_lock_9', 'automation.copy_Front Lock_accesslimit_back_lock_9', 'automation.copy_Front Lock_accesscount_back_lock_9', 'automation.copy_Front Lock_daterange_back_lock_9', 'automation.copy_Front Lock_start_date_back_lock_9', 'automation.copy_Front Lock_end_date_back_lock_9', 'automation.copy_Front Lock_sun_back_lock_9', 'automation.copy_Front Lock_sun_inc_back_lock_9', 'automation.copy_Front Lock_sun_start_date_back_lock_9', 'automation.copy_Front Lock_sun_end_date_back_lock_9', 'automation.copy_Front Lock_mon_back_lock_9', 'automation.copy_Front Lock_mon_inc_back_lock_9', 'automation.copy_Front Lock_mon_start_date_back_lock_9', 'automation.copy_Front Lock_mon_end_date_back_lock_9', 'automation.copy_Front Lock_tue_back_lock_9', 'automation.copy_Front Lock_tue_inc_back_lock_9', 'automation.copy_Front Lock_tue_start_date_back_lock_9', 'automation.copy_Front Lock_tue_end_date_back_lock_9', 'automation.copy_Front Lock_wed_back_lock_9', 'automation.copy_Front Lock_wed_inc_back_lock_9', 'automation.copy_Front Lock_wed_start_date_back_lock_9', 'automation.copy_Front Lock_wed_end_date_back_lock_9', 'automation.copy_Front Lock_thu_back_lock_9', 'automation.copy_Front Lock_thu_inc_back_lock_9', 'automation.copy_Front Lock_thu_start_date_back_lock_9', 'automation.copy_Front Lock_thu_end_date_back_lock_9', 'automation.copy_Front Lock_fri_back_lock_9', 'automation.copy_Front Lock_fri_inc_back_lock_9', 'automation.copy_Front Lock_fri_start_date_back_lock_9', 'automation.copy_Front Lock_fri_end_date_back_lock_9', 'automation.copy_Front Lock_sat_back_lock_9', 'automation.copy_Front Lock_sat_inc_back_lock_9', 'automation.copy_Front Lock_sat_start_date_back_lock_9', 'automation.copy_Front Lock_sat_end_date_back_lock_9']
January 15, 2022, 7:18:18 PM ā€“ (ERROR) Automation
keymaster_override_parent_back_lock_9_state_change: Error executing script. Error for call_service at pos 1: Template rendered invalid entity IDs: ['automation.copy_Front Lock_name_back_lock_9', 'automation.copy_Front Lock_pin_back_lock_9', 'automation.copy_Front Lock_enabled_back_lock_9', 'automation.copy_Front Lock_notify_back_lock_9', 'automation.copy_Front Lock_reset_back_lock_9', 'automation.copy_Front Lock_accesslimit_back_lock_9', 'automation.copy_Front Lock_accesscount_back_lock_9', 'automation.copy_Front Lock_daterange_back_lock_9', 'automation.copy_Front Lock_start_date_back_lock_9', 'automation.copy_Front Lock_end_date_back_lock_9', 'automation.copy_Front Lock_sun_back_lock_9', 'automation.copy_Front Lock_sun_inc_back_lock_9', 'automation.copy_Front Lock_sun_start_date_back_lock_9', 'automation.copy_Front Lock_sun_end_date_back_lock_9', 'automation.copy_Front Lock_mon_back_lock_9', 'automation.copy_Front Lock_mon_inc_back_lock_9', 'automation.copy_Front Lock_mon_start_date_back_lock_9', 'automation.copy_Front Lock_mon_end_date_back_lock_9', 'automation.copy_Front Lock_tue_back_lock_9', 'automation.copy_Front Lock_tue_inc_back_lock_9', 'automation.copy_Front Lock_tue_start_date_back_lock_9', 'automation.copy_Front Lock_tue_end_date_back_lock_9', 'automation.copy_Front Lock_wed_back_lock_9', 'automation.copy_Front Lock_wed_inc_back_lock_9', 'automation.copy_Front Lock_wed_start_date_back_lock_9', 'automation.copy_Front Lock_wed_end_date_back_lock_9', 'automation.copy_Front Lock_thu_back_lock_9', 'automation.copy_Front Lock_thu_inc_back_lock_9', 'automation.copy_Front Lock_thu_start_date_back_lock_9', 'automation.copy_Front Lock_thu_end_date_back_lock_9', 'automation.copy_Front Lock_fri_back_lock_9', 'automation.copy_Front Lock_fri_inc_back_lock_9', 'automation.copy_Front Lock_fri_start_date_back_lock_9', 'automation.copy_Front Lock_fri_end_date_back_lock_9', 'automation.copy_Front Lock_sat_back_lock_9', 'automation.copy_Front Lock_sat_inc_back_lock_9', 'automation.copy_Front Lock_sat_start_date_back_lock_9', 'automation.copy_Front Lock_sat_end_date_back_lock_9']
January 15, 2022, 7:18:18 PM ā€“ (ERROR) Automation
keymaster_back_lock_copy_from_parent_9: Error executing script. Error for call_service at pos 1: Template rendered invalid entity IDs: ['automation.copy_Front Lock_name_back_lock_9', 'automation.copy_Front Lock_pin_back_lock_9', 'automation.copy_Front Lock_enabled_back_lock_9', 'automation.copy_Front Lock_notify_back_lock_9', 'automation.copy_Front Lock_reset_back_lock_9', 'automation.copy_Front Lock_accesslimit_back_lock_9', 'automation.copy_Front Lock_accesscount_back_lock_9', 'automation.copy_Front Lock_daterange_back_lock_9', 'automation.copy_Front Lock_start_date_back_lock_9', 'automation.copy_Front Lock_end_date_back_lock_9', 'automation.copy_Front Lock_sun_back_lock_9', 'automation.copy_Front Lock_sun_inc_back_lock_9', 'automation.copy_Front Lock_sun_start_date_back_lock_9', 'automation.copy_Front Lock_sun_end_date_back_lock_9', 'automation.copy_Front Lock_mon_back_lock_9', 'automation.copy_Front Lock_mon_inc_back_lock_9', 'automation.copy_Front Lock_mon_start_date_back_lock_9', 'automation.copy_Front Lock_mon_end_date_back_lock_9', 'automation.copy_Front Lock_tue_back_lock_9', 'automation.copy_Front Lock_tue_inc_back_lock_9', 'automation.copy_Front Lock_tue_start_date_back_lock_9', 'automation.copy_Front Lock_tue_end_date_back_lock_9', 'automation.copy_Front Lock_wed_back_lock_9', 'automation.copy_Front Lock_wed_inc_back_lock_9', 'automation.copy_Front Lock_wed_start_date_back_lock_9', 'automation.copy_Front Lock_wed_end_date_back_lock_9', 'automation.copy_Front Lock_thu_back_lock_9', 'automation.copy_Front Lock_thu_inc_back_lock_9', 'automation.copy_Front Lock_thu_start_date_back_lock_9', 'automation.copy_Front Lock_thu_end_date_back_lock_9', 'automation.copy_Front Lock_fri_back_lock_9', 'automation.copy_Front Lock_fri_inc_back_lock_9', 'automation.copy_Front Lock_fri_start_date_back_lock_9', 'automation.copy_Front Lock_fri_end_date_back_lock_9', 'automation.copy_Front Lock_sat_back_lock_9', 'automation.copy_Front Lock_sat_inc_back_lock_9', 'automation.copy_Front Lock_sat_start_date_back_lock_9', 'automation.copy_Front Lock_sat_end_date_back_lock_9']
January 15, 2022, 7:18:18 PM ā€“ (ERROR) Script

One more thingā€¦ I think I added the new lock to keymaster without setting the parent first. Then I went back and edited it to set a parent.