FutureTense / keymaster

Home Assistant integration for managing Z-Wave enabled locks
MIT License
219 stars 43 forks source link

ISSUE: Error adding new lock #243

Closed rplankenhorn closed 2 years ago

rplankenhorn commented 2 years ago

Describe the bug I see an error when adding a new lock. It looks like it's having trouble generating the yaml files.

Environment (please complete the following information):

Logs

Logger: homeassistant.config_entries
Source: custom_components/keymaster/services.py:248 
Integration: keymaster (documentation, issues) 
First occurred: October 25, 2021, 4:30:20 PM (4 occurrences) 
Last logged: 11:32:40 AM

Error setting up entry basement_guest_bedroom_door for keymaster
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 304, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/config/custom_components/keymaster/__init__.py", line 288, in async_setup_entry
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1491, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
    await self._hass.async_add_executor_job(handler.job.target, service_call)
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/keymaster/__init__.py", line 264, in _generate_package
    generate_package_files(hass, name)
  File "/config/custom_components/keymaster/services.py", line 248, in generate_package_files
    raise ValueError(f"Couldn't find existing lock entry for {name}")
ValueError: Couldn't find existing lock entry for basement_guest_bedroom_door

Screenshots Screen Shot 2021-10-26 at 11 35 11 AM

Additional context I have 5 Kwikset locks that I have successfully added previously without issues. I have one parent lock and the other 4 are child locks. For the new locks I am adding, I have tried adding them both as child locks and non child locks but still am seeing the same issue as above.

I also double checked the permissions in the packages folder but everything looks correct to me.

rplankenhorn commented 2 years ago

Well not sure what happened but just to be safe, I did chown -R pi:pi ./config, rebooted HA, and then I was able to successfully add all my locks.