FutureTense / keymaster

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

ISSUE: Unable to add child lock #354

Closed chelming closed 9 months ago

chelming commented 9 months ago

Describe the bug When I add a child lock I get "failed to set up." Running keymaster.generate_package isn't generating a script for the new lock.

Environment (please complete the following information):

Logs Error log 1

Logger: homeassistant.config_entries
Source: config_entries.py:444
First occurred: 11:34:41 AM (1 occurrences)
Last logged: 11:34:41 AM

Error setting up entry front_door_deadbolt for keymaster
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 444, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/keymaster/__init__.py", line 302, in async_setup_entry
    await init_child_locks(
  File "/config/custom_components/keymaster/services.py", line 63, in init_child_locks
    await call_service(hass, SCRIPT_DOMAIN, the_service)
  File "/config/custom_components/keymaster/services.py", line 77, in call_service
    raise err
  File "/config/custom_components/keymaster/services.py", line 72, in call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 2224, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: Service script.keymaster_front_door_deadbolt_copy_from_parent_1 not found.

Error log 2

Logger: homeassistant.config_entries
Source: config_entries.py:444
First occurred: 11:41:14 AM (2 occurrences)
Last logged: 11:41:14 AM

Error setting up entry Front Door for binary_sensor
Error setting up entry Front Door for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 444, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/binary_sensor/__init__.py", line 238, in async_setup_entry
    return await component.async_setup_entry(entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 183, in async_setup_entry
    raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!

Additional context I've run

service: keymaster.generate_package
data: {"lockname": "front_door_deadbolt"}

but I'm not getting any scripts generated for the front_door_deadbolt.

chelming commented 9 months ago

Might've figured it out. My packages dir was /config/settings/packages. My old keymaster folder was in there, the new one was in /config/packages.

Moved the stuff and included the /config/packages folder and it seems like it set up.

chelming commented 9 months ago

looks good 👍