Code Monkey home page Code Monkey logo

lock_code_manager's Introduction

NOTE: This integration is in very early stages, so expect things to not work as expected. Feel free to open issues to report anything you find, but I would not recommend using this for production usage yet.

Lock Code Manager

Lock Code Manager is a Home Assistant integration that allows you to more easily manage your usercodes on your locks. Once you have configured it, the integration will set and clear codes on your locks as needed depending on how you decide to configure them.

Features:

  • Synchronize multiple locks with a single set of codes
  • Optionally use a calendar entity to activate and deactivate a code
  • Optionally define a maximum number of uses for a code before the code is disabled

Locks from the following integrations are currently supported:

The code was written to make it (I think) easy to add support for locks in other integrations. Check the Wiki if you want to learn more about that and take a stab at it. Contributors welcome!

Installation

The best way to install this integration is via HACS.

  1. Set up your locks as entities to your Home Assistant instance through the corresponding integration (e.g. Z-Wave)
  2. Add this repository as a custom integration repository in HACS
  3. Go to Settings > Devices & Services > Add Integration
  4. Select Lock Code Manager
  5. Follow the prompts - additional information about the configuration options are available in the Wiki

Learn More

The Wiki is a WIP but has some content that might be helpful for you!

Add a UI for lock management

Lock Code Manager makes it easy for you to generate a UI for managing and monitoring your PINs.

See this wiki article for more details

Inspiration

I spent some time contributing to keymaster, and what I learned working on it, and the regular complaints users had about it generating too many automations, entities, etc. led me to take a different approach. This isn't a knock on keymaster, unfortunately a lot of what is built in this integration wasn't possible for most of keymaster's life. I briefly considered implementing this into keymaster but:

  1. keymaster is still a great solution that works as is, and is more feature rich than this integration will likely ever be.
  2. keymaster is surprisingly simple under the hood because it makes Home Assistant do a lot of the heavy lifting for figuring out when to enable and disable a usercode. This integration, on the otherhand, attempts to do all of the heavy lifting internally in code, which means it will generate less entities and automations but it is likely more fragile to changes in HA Core or even changes in the codebase.
  3. It would be impossible to seamlessly migrate users from the current implementation of keymaster to this integration's implementation. Rewriting keymaster to do this would have been the equivalent of creating a new integration anyway, and since it's a separate integration, users have a choice of what implementation they want to use. Additionally, you can install the integrations side by side and slowly migrate your locks over in either direction as needed.

Thanks

A big thank you to the other keymaster maintainers:

  • @FutureTense
  • @firstof9

As well as the person who created the base concept that keymaster evolved from: @ptdalen

lock_code_manager's People

Contributors

dependabot[bot] avatar pre-commit-ci[bot] avatar raman325 avatar tykeal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

firstof9 tykeal

lock_code_manager's Issues

[Feature Request] Update when 2024.4.0 is released

Problem Description

No response

Feature Description

  1. Remove logic to expect Event in event_filters (look for references to hass.bus.async_listen
  2. Bump minimum HA version to 2024.4.0

Anything else?

No response

[ISSUE] don't clear slot and set slot on startup

What happened?

Every time HA is started with a LCM configuration, if the lock codes are supposed to be set, they are first cleared then set. Might be the same problem in the other direction

Steps to reproduce the issue

...

Home Assistant Version

n/a

What version of Lock Code Manager are you running?

n/a

Lock make and model

No response

Relevant log output

No response

Screenshots

No response

Anything else?

No response

Version 0.4.0 broke the UI

What happened?

ERROR: No Lock Code Manager configuration with ID [redacted] found!

Steps to reproduce the issue

  1. install 0.4.0

...

Home Assistant Version

2024.3.1

What version of Lock Code Manager are you running?

0.4.0

Lock make and model

Kwikset 916 zwave

Relevant log output

No response

Screenshots

No response

Anything else?

Yaml:

strategy:
  type: custom:lock-code-manager
  include_code_slot_sensors: true
  
views:
  - strategy:
      type: custom:lock-code-manager
      config_entry_title: Home Locks
      include_code_slot_sensors: true
    icon: mdi:lock-smart
    title: Lock Code Manager

Strange interaction on UI between Enabled switch and PIN active status

What happened?

I have 5 filled slots. let's call them Slots A, B, C D & E.
They are all enabled, but PIN active status for Slot B is Off. All other slots show PIN active as On.

If I disable Slot C it makes the Slot B's PIN active status go from Off to On.

If I re-enable Slot C, it turns Slot C's PIN active to Off

This is an example, it's consistent across all slots. One slot is always inactive unless I disable it, then they are all active. When I enable any slot, it becomes inactive and makes the previously inactive slot active.

Lock function fails when a slot's PIN is inactive, and the PIN drops out of the Code Slot Sensor field. So to get all 5 slots to function, I need to disable the slot with the inactive PIN in order to make the PIN active.

Steps to reproduce the issue

As described in What happened?

Home Assistant Version

2024.5.2

What version of Lock Code Manager are you running?

0.4.6

Lock make and model

Yale Keyless Connected with z-wave module

Relevant log output

None

Screenshots

No response

Anything else?

No response

Unable to set usercode starting with a zero

What happened?

Successfully setup the integration but noticed that even number slots (2, 4 and 6) were not synced. The code_slot_#_pin showed the correct pin. On further investigation, code slots 2, 4 and 6 all started with a zero. Unknown if it is related.

Steps to reproduce the issue

...

Home Assistant Version

2024.3.0b6

What version of Lock Code Manager are you running?

0.3.1

Lock make and model

Kwikset 916 zwave

Relevant log output

Logger: homeassistant.util.logging
Source: util/logging.py:102
First occurred: 4:52:35 AM (3 occurrences)
Last logged: 4:52:35 AM

Exception in _add_keys_to_track when dispatching 'lock_code_manager_redacted_add_tracking_2': ({'enabled': False, 'name': False, 'pin': False, 'pin_used': False},) Traceback (most recent call last): File "/config/custom_components/lock_code_manager/binary_sensor.py", line 299, in _add_keys_to_track await self._update_state() File "/config/custom_components/lock_code_manager/binary_sensor.py", line 266, in _update_state await self.async_update_usercodes(states) File "/config/custom_components/lock_code_manager/binary_sensor.py", line 128, in async_update_usercodes await lock.async_set_usercode( File "/config/custom_components/lock_code_manager/providers/zwave_js.py", line 178, in async_set_usercode await self.async_call_service( File "/config/custom_components/lock_code_manager/providers/_base.py", line 217, in async_call_service raise err File "/config/custom_components/lock_code_manager/providers/_base.py", line 210, in async_call_service await self.hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 2319, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2356, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 905, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/zwave_js/lock.py", line 166, in async_set_lock_usercode await set_usercode(self.info.node, code_slot, usercode) File "/usr/local/lib/python3.12/site-packages/zwave_js_server/util/lock.py", line 145, in set_usercode raise ValueError("User code must be at least 4 digits") ValueError: User code must be at least 4 digits

Screenshots

No response

Anything else?

slots 4 and 6 have the exact same error message

`async_track_state_change` is deprecated, and removed in Home Assistant 2025.5

What happened?

Trying out Lock Code Manager for the first time (with the Virtual integration), and I'm seeing this error in the logs:

Detected that custom integration 'lock_code_manager' calls `async_track_state_change` instead of `async_track_state_change_event` which is deprecated and will be removed in Home Assistant 2025.5 at custom_components/lock_code_manager/entity.py, line 284: async_track_state_change(, please create a bug report at https://github.com/raman325/lock_code_manager/issues

Steps to reproduce the issue

  1. Install Virtual integration, and create 1 test lock
  2. Install/setup Lock Code Manager
  3. Check logs

Home Assistant Version

2024.5.1

What version of Lock Code Manager are you running?

0.4.6

Lock make and model

Virtual

Relevant log output

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:190
First occurred: 1:06:20 PM (8 occurrences)
Last logged: 1:11:06 PM

Detected that custom integration 'lock_code_manager' calls `async_track_state_change` instead of `async_track_state_change_event` which is deprecated and will be removed in Home Assistant 2025.5 at custom_components/lock_code_manager/entity.py, line 284: async_track_state_change(, please create a bug report at https://github.com/raman325/lock_code_manager/issues

Screenshots

No response

Anything else?

No response

[ISSUE] Changing PIN on active slot does not update the code

What happened?

A PIN code being changed when the slot is already enabled and in sync does not push the new code

Steps to reproduce the issue

  1. Configure a code slot with a valid code and enable it
  2. Wait for the slot show synced
  3. Validate that the code really has been synced to the lock (check via ZWave-JS UI or something)
  4. Change the PIN
  5. Notice that the logbook will log the PIN change, but the code is never pushed to the lock
  6. Notice that the code slot sensor never updates
  7. Disable slot and wait for the slot to properly sync
  8. Enable slot and wait for the slot to sync
  9. Notice that the slot is now using the new code

Home Assistant Version

2024.2.5

What version of Lock Code Manager are you running?

0.2.5 (commit fb4fec3, current HEAD at time of report)

Lock make and model

Kwikset 910

Relevant log output

No response

Screenshots

No response

Anything else?

No response

[Feature Request] Keep it modular / don't duplicate functionality of home assistant

Is your feature request related to a problem? Please describe.
I am currently using keymaster and for the life of me don't understand why it has certain features that are essentially standard automations like the door sensors and auto lock. These should be kept out of the main "lock manager"
I would very much like a lock code manager that JUST provides lock code management, and unique features to lock code management.

Describe the solution you'd like

  • Sync codes / name codes between locks
  • Add history / log book events with the codes NICE NAME in them "House sitter", "Janes code" so I know who unlocked the door
  • Timed / calendar dependent codes
  • maybe provide blueprints for the semi redundant stuff or separate it as a second addon if implemented to keep the code management clean

Timeout loading view strategy (view and dashboard)

What happened?

Error loading the view strategy:
Error: Timeout waiting for strategy element ll-strategy-view-lock-code-manager to be registered

Steps to reproduce the issue

Part 1

  1. Added a config entry for Lock Code Manager
  2. Added 8 code slots
  3. Disabled 2 code slots
  4. Added the strategy as a new dashboard
  5. Loaded the dashboard and everything looked good

Part 2

  1. Went back to integration for Lock Code Manager, clicked configure, added second lock as an entity
  2. Went to the dashboard and everything looked good

Part 3

  1. Went back to integration for Lock Code Manager, clicked configure, removed the second lock as an entity
  2. Went to the dashboard and got the above error

Home Assistant Version

2024.2.5

What version of Lock Code Manager are you running?

0.2.5

Lock make and model

Yale Assure 2 - YRD450-ZW2

Relevant log output

Error loading the view strategy:
Error: Timeout waiting for strategy element ll-strategy-view-lock-code-manager to be registered

2024-03-04 13:20:08.689 DEBUG (MainThread) [custom_components.lock_code_manager] Registered strategy module (resource ID 20dd892e8f5e46ffb4ba7449a0937dd3)
2024-03-04 13:20:08.689 DEBUG (MainThread) [custom_components.lock_code_manager] Finished setting up websocket API
2024-03-04 13:20:08.837 INFO (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Creating and/or updating entities
2024-03-04 13:20:09.163 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding following locks: ['lock.front_door_deadbolt', 'lock.side_door_deadbolt']
2024-03-04 13:20:09.163 DEBUG (MainThread) [custom_components.lock_code_manager.helpers] a30330c26c73ee8d4f272eb212eb3393 (Home): Created lock instance ZWaveJSLock(domain=zwave_js, lock=lock.front_door_deadbolt)
2024-03-04 13:20:09.163 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Creating lock instance for lock ZWaveJSLock(domain=zwave_js, lock=lock.front_door_deadbolt)
2024-03-04 13:20:09.163 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Creating coordinator for lock ZWaveJSLock(domain=zwave_js, lock=lock.front_door_deadbolt)
2024-03-04 13:20:09.165 DEBUG (MainThread) [custom_components.lock_code_manager.coordinator] Finished fetching lock_code_manager lock.front_door_deadbolt data in 0.002 seconds (success: True)
2024-03-04 13:20:09.165 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding lock lock.front_door_deadbolt slot 1 sensor and event entity
2024-03-04 13:20:09.165 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding lock lock.front_door_deadbolt slot 2 sensor and event entity
2024-03-04 13:20:09.165 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding lock lock.front_door_deadbolt slot 3 sensor and event entity
2024-03-04 13:20:09.165 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding lock lock.front_door_deadbolt slot 4 sensor and event entity
2024-03-04 13:20:09.165 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding lock lock.front_door_deadbolt slot 5 sensor and event entity
2024-03-04 13:20:09.165 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding lock lock.front_door_deadbolt slot 6 sensor and event entity
2024-03-04 13:20:09.165 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding lock lock.front_door_deadbolt slot 7 sensor and event entity
2024-03-04 13:20:09.165 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding lock lock.front_door_deadbolt slot 8 sensor and event entity
2024-03-04 13:20:09.165 DEBUG (MainThread) [custom_components.lock_code_manager.helpers] a30330c26c73ee8d4f272eb212eb3393 (Home): Created lock instance ZWaveJSLock(domain=zwave_js, lock=lock.side_door_deadbolt)
2024-03-04 13:20:09.165 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Creating lock instance for lock ZWaveJSLock(domain=zwave_js, lock=lock.side_door_deadbolt)
2024-03-04 13:20:09.165 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Creating coordinator for lock ZWaveJSLock(domain=zwave_js, lock=lock.side_door_deadbolt)
2024-03-04 13:20:09.166 DEBUG (MainThread) [custom_components.lock_code_manager.coordinator] Finished fetching lock_code_manager lock.side_door_deadbolt data in 0.001 seconds (success: True)
2024-03-04 13:20:09.166 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding lock lock.side_door_deadbolt slot 1 sensor and event entity
2024-03-04 13:20:09.166 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding lock lock.side_door_deadbolt slot 2 sensor and event entity
2024-03-04 13:20:09.166 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding lock lock.side_door_deadbolt slot 3 sensor and event entity
2024-03-04 13:20:09.166 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding lock lock.side_door_deadbolt slot 4 sensor and event entity
2024-03-04 13:20:09.166 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding lock lock.side_door_deadbolt slot 5 sensor and event entity
2024-03-04 13:20:09.166 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding lock lock.side_door_deadbolt slot 6 sensor and event entity
2024-03-04 13:20:09.166 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding lock lock.side_door_deadbolt slot 7 sensor and event entity
2024-03-04 13:20:09.166 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding lock lock.side_door_deadbolt slot 8 sensor and event entity
2024-03-04 13:20:09.166 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding PIN enabled binary sensor for slot 1
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding enabled entity for slot 1
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding name entity for slot 1
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding pin entity for slot 1
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding pin_used entity for slot 1
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding PIN enabled binary sensor for slot 2
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding enabled entity for slot 2
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding name entity for slot 2
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding pin entity for slot 2
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding pin_used entity for slot 2
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding PIN enabled binary sensor for slot 3
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding enabled entity for slot 3
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding name entity for slot 3
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding pin entity for slot 3
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding pin_used entity for slot 3
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding PIN enabled binary sensor for slot 4
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding enabled entity for slot 4
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding name entity for slot 4
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding pin entity for slot 4
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding pin_used entity for slot 4
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding PIN enabled binary sensor for slot 5
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding enabled entity for slot 5
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding name entity for slot 5
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding pin entity for slot 5
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding pin_used entity for slot 5
2024-03-04 13:20:09.167 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding PIN enabled binary sensor for slot 6
2024-03-04 13:20:09.168 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding enabled entity for slot 6
2024-03-04 13:20:09.168 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding name entity for slot 6
2024-03-04 13:20:09.168 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding pin entity for slot 6
2024-03-04 13:20:09.168 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding pin_used entity for slot 6
2024-03-04 13:20:09.168 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding PIN enabled binary sensor for slot 7
2024-03-04 13:20:09.168 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding enabled entity for slot 7
2024-03-04 13:20:09.168 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding name entity for slot 7
2024-03-04 13:20:09.168 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding pin entity for slot 7
2024-03-04 13:20:09.168 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding pin_used entity for slot 7
2024-03-04 13:20:09.168 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding PIN enabled binary sensor for slot 8
2024-03-04 13:20:09.168 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding enabled entity for slot 8
2024-03-04 13:20:09.168 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding name entity for slot 8
2024-03-04 13:20:09.168 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding pin entity for slot 8
2024-03-04 13:20:09.168 DEBUG (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding pin_used entity for slot 8
2024-03-04 13:20:09.168 INFO (MainThread) [custom_components.lock_code_manager] a30330c26c73ee8d4f272eb212eb3393 (Home): Done creating and/or updating entities
2024-03-04 13:20:09.174 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity sensor.front_door_deadbolt_code_slot_2_code
2024-03-04 13:20:09.174 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity sensor.front_door_deadbolt_code_slot_3_code
2024-03-04 13:20:09.174 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity sensor.front_door_deadbolt_code_slot_4_code
2024-03-04 13:20:09.175 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity sensor.front_door_deadbolt_code_slot_5_code
2024-03-04 13:20:09.175 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity sensor.front_door_deadbolt_code_slot_6_code
2024-03-04 13:20:09.175 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity sensor.front_door_deadbolt_code_slot_7_code
2024-03-04 13:20:09.175 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity sensor.front_door_deadbolt_code_slot_8_code
2024-03-04 13:20:09.176 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity sensor.side_door_deadbolt_code_slot_2_code
2024-03-04 13:20:09.176 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity sensor.side_door_deadbolt_code_slot_3_code
2024-03-04 13:20:09.176 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity sensor.side_door_deadbolt_code_slot_4_code
2024-03-04 13:20:09.176 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity sensor.side_door_deadbolt_code_slot_5_code
2024-03-04 13:20:09.177 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity sensor.side_door_deadbolt_code_slot_6_code
2024-03-04 13:20:09.177 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity sensor.side_door_deadbolt_code_slot_7_code
2024-03-04 13:20:09.177 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity sensor.side_door_deadbolt_code_slot_8_code
2024-03-04 13:20:09.177 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity binary_sensor.code_slot_1_pin_synced_to_locks
2024-03-04 13:20:09.178 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity event.code_slot_1
2024-03-04 13:20:09.178 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity text.code_slot_1_name
2024-03-04 13:20:09.178 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity text.code_slot_1_pin
2024-03-04 13:20:09.179 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity switch.code_slot_1_enabled
2024-03-04 13:20:09.179 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Sending signal from switch.code_slot_1_enabled to binary sensor that slot 1 is ready
2024-03-04 13:20:09.179 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity binary_sensor.code_slot_2_pin_synced_to_locks
2024-03-04 13:20:09.179 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity event.code_slot_2
2024-03-04 13:20:09.180 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity text.code_slot_2_name
2024-03-04 13:20:09.181 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity text.code_slot_2_pin
2024-03-04 13:20:09.181 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity switch.code_slot_2_enabled
2024-03-04 13:20:09.181 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Sending signal from switch.code_slot_2_enabled to binary sensor that slot 2 is ready
2024-03-04 13:20:09.181 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity binary_sensor.code_slot_3_pin_synced_to_locks
2024-03-04 13:20:09.181 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity event.code_slot_3
2024-03-04 13:20:09.182 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity text.code_slot_3_name
2024-03-04 13:20:09.182 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity text.code_slot_3_pin
2024-03-04 13:20:09.182 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity switch.code_slot_3_enabled
2024-03-04 13:20:09.182 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Sending signal from switch.code_slot_3_enabled to binary sensor that slot 3 is ready
2024-03-04 13:20:09.182 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity binary_sensor.code_slot_4_pin_synced_to_locks
2024-03-04 13:20:09.183 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity event.code_slot_4
2024-03-04 13:20:09.183 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity text.code_slot_4_name
2024-03-04 13:20:09.183 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity text.code_slot_4_pin
2024-03-04 13:20:09.184 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity switch.code_slot_4_enabled
2024-03-04 13:20:09.184 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Sending signal from switch.code_slot_4_enabled to binary sensor that slot 4 is ready
2024-03-04 13:20:09.184 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity binary_sensor.code_slot_5_pin_synced_to_locks
2024-03-04 13:20:09.185 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity event.code_slot_5
2024-03-04 13:20:09.185 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity text.code_slot_5_name
2024-03-04 13:20:09.185 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity text.code_slot_5_pin
2024-03-04 13:20:09.185 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity switch.code_slot_5_enabled
2024-03-04 13:20:09.185 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Sending signal from switch.code_slot_5_enabled to binary sensor that slot 5 is ready
2024-03-04 13:20:09.186 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity binary_sensor.code_slot_6_pin_synced_to_locks
2024-03-04 13:20:09.186 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity event.code_slot_6
2024-03-04 13:20:09.186 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity text.code_slot_6_name
2024-03-04 13:20:09.187 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity text.code_slot_6_pin
2024-03-04 13:20:09.187 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity switch.code_slot_6_enabled
2024-03-04 13:20:09.187 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Sending signal from switch.code_slot_6_enabled to binary sensor that slot 6 is ready
2024-03-04 13:20:09.187 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity binary_sensor.code_slot_7_pin_synced_to_locks
2024-03-04 13:20:09.187 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity event.code_slot_7
2024-03-04 13:20:09.188 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity text.code_slot_7_name
2024-03-04 13:20:09.188 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity text.code_slot_7_pin
2024-03-04 13:20:09.188 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity switch.code_slot_7_enabled
2024-03-04 13:20:09.188 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Sending signal from switch.code_slot_7_enabled to binary sensor that slot 7 is ready
2024-03-04 13:20:09.188 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity binary_sensor.code_slot_8_pin_synced_to_locks
2024-03-04 13:20:09.189 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity event.code_slot_8
2024-03-04 13:20:09.195 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity text.code_slot_8_name
2024-03-04 13:20:09.195 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity text.code_slot_8_pin
2024-03-04 13:20:09.196 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity switch.code_slot_8_enabled
2024-03-04 13:20:09.196 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Sending signal from switch.code_slot_8_enabled to binary sensor that slot 8 is ready
2024-03-04 13:20:09.206 DEBUG (MainThread) [custom_components.lock_code_manager.coordinator] Finished fetching lock_code_manager lock.front_door_deadbolt data in 0.002 seconds (success: True)
2024-03-04 13:20:09.226 DEBUG (MainThread) [custom_components.lock_code_manager.coordinator] Finished fetching lock_code_manager lock.side_door_deadbolt data in 0.002 seconds (success: True)
2024-03-04 13:20:09.247 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity sensor.front_door_deadbolt_code_slot_1_code
2024-03-04 13:20:09.247 DEBUG (MainThread) [custom_components.lock_code_manager.entity] a30330c26c73ee8d4f272eb212eb3393 (Home): Adding entity sensor.side_door_deadbolt_code_slot_1_code
2024-03-04 13:20:09.248 DEBUG (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Updating binary_sensor.code_slot_1_pin_synced_to_locks
2024-03-04 13:20:09.248 INFO (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Setting usercode for lock.front_door_deadbolt slot 1
2024-03-04 13:20:09.248 DEBUG (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Updating binary_sensor.code_slot_1_pin_synced_to_locks
2024-03-04 13:20:09.248 INFO (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Setting usercode for lock.front_door_deadbolt slot 1
2024-03-04 13:20:09.249 DEBUG (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Updating binary_sensor.code_slot_2_pin_synced_to_locks
2024-03-04 13:20:09.249 DEBUG (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Updating binary_sensor.code_slot_2_pin_synced_to_locks
2024-03-04 13:20:09.249 DEBUG (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Updating binary_sensor.code_slot_3_pin_synced_to_locks
2024-03-04 13:20:09.249 INFO (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Setting usercode for lock.front_door_deadbolt slot 3
2024-03-04 13:20:09.249 DEBUG (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Updating binary_sensor.code_slot_3_pin_synced_to_locks
2024-03-04 13:20:09.249 INFO (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Setting usercode for lock.front_door_deadbolt slot 3
2024-03-04 13:20:09.249 DEBUG (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Updating binary_sensor.code_slot_4_pin_synced_to_locks
2024-03-04 13:20:09.249 INFO (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Setting usercode for lock.front_door_deadbolt slot 4
2024-03-04 13:20:09.250 DEBUG (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Updating binary_sensor.code_slot_4_pin_synced_to_locks
2024-03-04 13:20:09.250 INFO (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Setting usercode for lock.front_door_deadbolt slot 4
2024-03-04 13:20:09.250 DEBUG (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Updating binary_sensor.code_slot_5_pin_synced_to_locks
2024-03-04 13:20:09.250 INFO (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Setting usercode for lock.side_door_deadbolt slot 5
2024-03-04 13:20:09.250 DEBUG (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Updating binary_sensor.code_slot_5_pin_synced_to_locks
2024-03-04 13:20:09.250 INFO (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Setting usercode for lock.side_door_deadbolt slot 5
2024-03-04 13:20:09.250 DEBUG (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Updating binary_sensor.code_slot_6_pin_synced_to_locks
2024-03-04 13:20:09.251 DEBUG (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Updating binary_sensor.code_slot_6_pin_synced_to_locks
2024-03-04 13:20:09.251 DEBUG (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Updating binary_sensor.code_slot_7_pin_synced_to_locks
2024-03-04 13:20:09.251 DEBUG (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Updating binary_sensor.code_slot_7_pin_synced_to_locks
2024-03-04 13:20:09.251 DEBUG (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Updating binary_sensor.code_slot_8_pin_synced_to_locks
2024-03-04 13:20:09.251 DEBUG (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Updating binary_sensor.code_slot_8_pin_synced_to_locks
2024-03-04 13:20:11.594 INFO (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Setting usercode for lock.side_door_deadbolt slot 4
2024-03-04 13:20:11.595 INFO (MainThread) [custom_components.lock_code_manager.binary_sensor] a30330c26c73ee8d4f272eb212eb3393 (Home): Setting usercode for lock.side_door_deadbolt slot 4
2024-03-04 13:21:09.279 DEBUG (MainThread) [custom_components.lock_code_manager.coordinator] Finished fetching lock_code_manager lock.side_door_deadbolt data in 0.002 seconds (success: True)
2024-03-04 13:21:09.399 DEBUG (MainThread) [custom_components.lock_code_manager.coordinator] Finished fetching lock_code_manager lock.front_door_deadbolt data in 0.002 seconds (success: True)
2024-03-04 13:22:09.279 DEBUG (MainThread) [custom_components.lock_code_manager.coordinator] Finished fetching lock_code_manager lock.side_door_deadbolt data in 0.002 seconds (success: True)
2024-03-04 13:22:09.399 DEBUG (MainThread) [custom_components.lock_code_manager.coordinator] Finished fetching lock_code_manager lock.front_door_deadbolt data in 0.001 seconds (success: True)

Here are some more logs. I'm not sure they're applicable to this issue or something separate

Logger: homeassistant
Source: custom_components/lock_code_manager/entity.py:267
Integration: Lock Code Manager (documentation, issues)
First occurred: 1:06:50 PM (6432 occurrences)
Last logged: 1:15:52 PM

Error doing job: Exception in callback async_track_state_change.<locals>.state_change_dispatcher(<Event state_...768811-05:00>>) at /usr/src/homeassistant/homeassistant/helpers/event.py:224
Error doing job: Exception in callback async_track_state_change.<locals>.state_change_dispatcher(<Event state_...078844-05:00>>) at /usr/src/homeassistant/homeassistant/helpers/event.py:224
Error doing job: Exception in callback async_track_state_change.<locals>.state_change_dispatcher(<Event state_...079249-05:00>>) at /usr/src/homeassistant/homeassistant/helpers/event.py:224
Error doing job: Exception in callback async_track_state_change.<locals>.state_change_dispatcher(<Event state_...251185-05:00>>) at /usr/src/homeassistant/homeassistant/helpers/event.py:224
Error doing job: Exception in callback async_track_state_change.<locals>.state_change_dispatcher(<Event state_...251527-05:00>>) at /usr/src/homeassistant/homeassistant/helpers/event.py:224
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/asyncio/events.py", line 84, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 227, in state_change_dispatcher
    hass.async_run_hass_job(
  File "/usr/src/homeassistant/homeassistant/core.py", line 700, in async_run_hass_job
    hassjob.target(*args)
  File "/config/custom_components/lock_code_manager/entity.py", line 267, in _handle_available_state_update
    and entity_id not in (lock.lock.entity_id for lock in self.locks)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/lock_code_manager/entity.py", line 267, in <genexpr>
    and entity_id not in (lock.lock.entity_id for lock in self.locks)
                          ^^^^^^^^^
AttributeError: 'str' object has no attribute 'lock'
Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:636
Integration: Sensor (documentation, issues)
First occurred: 1:00:05 PM (8 occurrences)
Last logged: 1:00:05 PM

Platform lock_code_manager does not generate unique IDs. ID a30330c26c73ee8d4f272eb212eb3393|5|code|lock.front_door_deadbolt already exists - ignoring sensor.front_door_deadbolt_code_slot_5_code
Platform lock_code_manager does not generate unique IDs. ID a30330c26c73ee8d4f272eb212eb3393|6|code|lock.front_door_deadbolt already exists - ignoring sensor.front_door_deadbolt_code_slot_6_code
Platform lock_code_manager does not generate unique IDs. ID a30330c26c73ee8d4f272eb212eb3393|7|code|lock.front_door_deadbolt already exists - ignoring sensor.front_door_deadbolt_code_slot_7_code
Platform lock_code_manager does not generate unique IDs. ID a30330c26c73ee8d4f272eb212eb3393|8|code|lock.front_door_deadbolt already exists - ignoring sensor.front_door_deadbolt_code_slot_8_code
Platform lock_code_manager does not generate unique IDs. ID a30330c26c73ee8d4f272eb212eb3393|1|code|lock.front_door_deadbolt already exists - ignoring sensor.front_door_deadbolt_code_slot_1_code

View strategy shows binary sensors for sync state

What happened?

The binary sensors were switched to sensors but the sensors still show up on my view strategy. Is this the expected behavior because of how the switch happened? Should I just redo the configuration?

Steps to reproduce the issue

  1. Install pre 0.4.0
  2. Add view using the strategy
  3. Upgrade to 0.4.1

Home Assistant Version

2024.3.3

What version of Lock Code Manager are you running?

0.4.1

Lock make and model

Yale qssure

Relevant log output

No response

Screenshots

No response

Anything else?

No response

Manual Setup of custom_componet fails

Describe the bug
I downloaded lock_code_manager.zip, version 0.2.5. I unzipped the file and added it to a folder named lock_code_manager under my custom_componet folder. Restart Hass and the setup seemed to go well. I used the UI method to add locks. After going through setup, the integration failed. Here are the logs:

2024-03-03 09:07:28.302 ERROR (MainThread) [homeassistant.setup] Error during setup of component lock_code_manager
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 390, in _async_setup_component
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/lock_code_manager/__init__.py", line 73, in async_setup
    for id, data in resources.data.items()
                    ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'items'

Environment (please complete the following information):

  • OS: Debian VM
  • Type of system that HA is running on: NUC
  • Home Assistant version: 2024.3.0b5
  • Hassio/Docker/Core: Docker
  • Component version: 0.2.5
  • Lock integration name: zwave_js
  • Lock make and model: Kwikset 916s

Logs
Paste your error logs here.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.
Please add emails in plain/text format if possible and applicable.

Error in event filter on 2024.4.0b1

What happened?

Logger: homeassistant.core
Source: core.py:1434
First occurred: 6:14:32 AM (9 occurrences)
Last logged: 6:58:24 AM

Error in event filter
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 1434, in _async_fire
if event_data is None or not event_filter(event_data):
^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/lock_code_manager/providers/zwave_js.py", line 91, in _zwave_js_event_filter
evt.data[ATTR_HOME_ID] == self.node.client.driver.controller.home_id
^^^^^^^^
AttributeError: 'dict' object has no attribute 'data'

Steps to reproduce the issue

...

Home Assistant Version

2024.4.0b1

What version of Lock Code Manager are you running?

0.4.2

Lock make and model

Kwikset 916

Relevant log output

No response

Screenshots

No response

Anything else?

No response

[ISSUE] When HA restarts, frontend needs a refresh to show the UI

What happened?

Frontend can't recover from an HA restart by itself

Steps to reproduce the issue

  1. Load the Lock Code Manager view or dashboard.
  2. Restart HA while staying on this page
  3. Observe that after HA starts, an error is shown
    ...

Home Assistant Version

n/a

What version of Lock Code Manager are you running?

n/a

Lock make and model

No response

Relevant log output

No response

Screenshots

No response

Anything else?

No response

[Feature Request] Viewable codes in UI

Problem Description

Not able to view codes in the card UI unless navigating to the yaml file.

Feature Description

Ability to toggle view code ability in card view, possible with command such as view_code: true/false in the yaml code or similar.

Anything else?

No response

ISSUE: Event Data missing

Describe the bug
A clear and concise description of what the bug is.
Event data doesn't populate the code slot names correctly. Shows as blank, hoping I did something wrong but I'm missing it right now.
Environment (please complete the following information):

  • OS: HassOS
  • Type of system that HA is running on: VirtualBox
  • Home Assistant version: 2024.3
  • Hassio/Docker/Core? Core
  • Component version: [e.g. 0.1.2]
  • Lock integration name: [e.g. zwave_js] zwave_js
  • Lock make and model: [e.g. Schlage BE469] schalge BE469

Logs
Paste your error logs here.

Screenshots
Screenshot 2024-03-01 165645
Screenshot 2024-03-01 165621

Additional context
Add any other context about the problem here.
Please add emails in plain/text format if possible and applicable.

ISSUE: Adding another integration to control a different block of slots causes

Describe the bug
I added a second integration to control a different set of slots and this causes a 500 error

Environment (please complete the following information):

  • OS: HassOS
  • Type of system that HA is running on: KVM
  • Home Assistant version: 2024.2.5
  • Hassio/Docker/Core? HassIO
  • Component version: 0.2.5
  • Lock integration name: ZWave-JS UI
  • Lock make and model: Kwikset 910

Logs

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 91, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 227, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 235, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 31, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 149, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 72, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 223, in post
    return await super().post(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
    result = await method(view, request, data, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 71, in post
    result = await self._flow_mgr.async_init(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 345, in async_init
    result = await self._async_handle_step(flow, flow.init_step, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 501, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/lock_code_manager/config_flow.py", line 314, in async_step_init
    CONF_LOCKS, default=_get_default(CONF_LOCKS)
                        ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/lock_code_manager/config_flow.py", line 307, in _get_default
    return user_input.get(key, self.config_entry.data[key])
                               ~~~~~~~~~~~~~~~~~~~~~~^^^^^
KeyError: 'locks'

Additional context
I have a use case where I would want to be able to define a LCM that manages 2 locks for a defined set of slots. One lock is shared with multiple blocks and one lock that only shares a single block with the main lock.

For example:

Lock1:
Slots 1 - 5 are not shared with all other locks
Slots 6 - 10 are not shared with any other locks
Slots 11 - 15 are shared with Lock2
Slots 16 - 20 are shared with Lock3

Lock2:
Slots 1 - 5 are shared with Lock1
Slots 6 - 10 are not shared with any other locks
Slots 11 - 15 are shared with Lock1

Lock3:
Slots 1 - 5 are shared with Lock1
Slots 6 - 15 are not shared with any other locks
Slots 16 - 20 are shared with Lock1

The testing that I was specifically doing at this time was to just define a new LCM that was managing a block of slots that are not defined in my first configured LCM

Reproduction steps

  1. Configure a single LCM with slots 1 - 5 defined against a lock and verify that everything is working
  2. Configure a second LCM with slots >5 defined against the same lock as the previous step
  3. Observe that new integration shows No devices or entities in the configuration page and that if you press the Configure button you will error logs similar to the above.

[Feature Request] Option to make PINs visible in the generated UI

Currently the only way to find out what PIN is assigned to a slot is to inspect the lock via ZWaveJS-UI or the diagnostic that is added to the lock (note this does not seem to always stay in sync!)

It would be nice to have an option in the UI to display the PIN instead of always being hidden. Perhaps a toggle just below the PIN field for Show / Hide PIN that defaults to off.

ISSUE: lock_code_manager.hard_refresh_usercodes fails

Describe the bug
I was testing to see what service calls were available and found the lock_code_maanger.hard_refresh_usercodes service. I configured it to target the device as well as the entity (tried twice, once with each option set solely). When calling the service I get back the following errors

For setting the target device

Failed to call service lock_code_manager.hard_refresh_usercodes. extra keys not allowed @ data['device_id']. Got None required key not provided @ data['entity_id']. Got None

The UI generated YAML was

service: lock_code_manager.hard_refresh_usercodes
data: {}
target:
  device_id: 96d32f0ab90ff3647a9138bd8af9faa5

For setting the target entity

Failed to call service lock_code_manager.hard_refresh_usercodes. value should be a string for dictionary value @ data['entity_id']. Got None

The UI generated YAML was

service: lock_code_manager.hard_refresh_usercodes
data: {}
target:
  entity_id: lock.test_lock

NOTE: If I modify the YAML to be the following:

service: lock_code_manager.hard_refresh_usercodes
data:
  entity_id: lock.test_lock

I get no errors, I also don't seem to get feedback if it worked. This tells me that something in your service definition does not seem to be configured correctly for the UI to properly build the service YAML

Environment (please complete the following information):

  • OS: HAOS
  • Type of system that HA is running on: KVM
  • Home Assistant version: 2024.2.5
  • Hassio/Docker/Core? HassIO
  • Component version: 0.2.5
  • Lock integration name: ZWave-JS UI
  • Lock make and model: Kwikset 910

[ISSUE] 0.4.0 breaks adding a lock

What happened?

I noticed that after upgrading to 0.4.0 that the UI was all broken. Since it was a breaking change update I decided to remove all of my lock definitions and start over (it's a test box, it's easy)

Adding in a new definition now gives me the below log spew and shows that it failed to setup in the UI

Steps to reproduce the issue

  1. Add a new lock configuration
  2. See that the integration UI shows that it failed to setup
  3. Inspect the logs to find errors
  4. See that the generated UI now complains that there is configuration for new lock ID

Home Assistant Version

2024.3.1

What version of Lock Code Manager are you running?

0.4.0

Lock make and model

No response

Relevant log output

2024-03-19 06:09:01.748 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Foo for lock_code_manager
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 504, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/lock_code_manager/__init__.py", line 174, in async_setup_entry
    hass.data[DOMAIN][entry_id] = {
    ~~~~~~~~~^^^^^^^^
KeyError: 'lock_code_manager'
2024-03-20 10:05:21.245 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Foo for lock_code_manager
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 504, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/lock_code_manager/__init__.py", line 174, in async_setup_entry
    hass.data[DOMAIN][entry_id] = {
    ~~~~~~~~~^^^^^^^^
KeyError: 'lock_code_manager'


### Screenshots

_No response_

### Anything else?

_No response_

Integration making zwave locks unavailable

What happened?

I have been having issues with locks dropping off the zwave network using lock code manager. After playing a bit, I decided to start listening to zwave_js_notification lock events. What I am seeing is (event_label == 'New user code added') followed by (event.data.event_label == 'New user code not added due to duplicate code')

It is not happening on every code slot or every lock and seems to be pretty random.

I have noticed that if I go into the ZwaveJS UI and set a fake code on the slot I can get all the slots sync'ed, otherwise the integration continues until the lock goes unavailable or times out. Activating the lock usually brings it back

Steps to reproduce the issue

...

Home Assistant Version

2024.4.0

What version of Lock Code Manager are you running?

0.4.5

Lock make and model

Kwikset 916 Zwave

Relevant log output

No response

Screenshots

No response

Anything else?

No response

Support Virtual locks

Is your feature request related to a problem? Please describe.
I would like to do some development work using this integration as a potential dependency of my own integration Rental Control. My test instance does not have a ZWave controller at all, even though I do install one of the ZWave addons.

I instead use the Virtual Components integration from HACS to have a lock that I can define for Keymaster and my own Rental Control to target (though Keymaster complains bitterly about not being able to find Zwave for good reason)

Describe the solution you'd like
I would like to be able to select Virtual locks (lock.virtual_<lock_name>) as a target to allow me to inspect and play with the UI even if it doesn't function 100%

Describe alternatives you've considered
If I had the funds and resources I would add a zwave controller to my test instance along with a real lock, but I don't really.

NOTE: I'm well aware that this really is a nice to have for development development work and if it's outside of what you want to support go ahead and just close this request.

[Feature Request] Wiki contributons

Feature Description

Can the wiki be set so users can contribute to it? I can add some screenshots and clarifications for things I was unclear on along the way.

[Feature Request] Keep code slot sensor in sync with PIN in sync sensor

Problem Description

When updating a code slot with a new PIN or disabling it the PIN in sync sensor is updated in real time but the code slot sensor(s) are not updated in real time. They can lag by up to 60 seconds.

Feature Description

The state of the code slot sensor should be up to date if the PIN in sync sensor is on

Anything else?

No response

Integration Fails To Load

What happened?

2024-03-05 13:50:43.884 INFO (MainThread) [homeassistant.setup] Setting up lock_code_manager
2024-03-05 13:50:43.885 ERROR (MainThread) [homeassistant.setup] Error during setup of component lock_code_manager
Traceback (most recent call last):
  File "/config/custom_components/lock_code_manager/__init__.py", line 88, in async_setup
    res_id = next(
             ^^^^^
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 390, in _async_setup_component
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/lock_code_manager/__init__.py", line 95, in async_setup
    data = await resources.async_create_item(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ResourceYAMLCollection' object has no attribute 'async_create_item'

Steps to reproduce the issue

  1. download, unzip, and place in custom_components/lock_code_manager/
  2. Add and configure integration
  3. integration errors saying it cannot be setup
    ...

Home Assistant Version

2024.3.0b6

What version of Lock Code Manager are you running?

0.30

Lock make and model

Kwikset 916 zwave

Relevant log output

No response

Screenshots

No response

Anything else?

No response

[Feature Request] Ability to remove a device

Problem Description

I set up a second lock in the same config entry as my first lock but I don't see a way to remove it. When I go to the device I only have the option to "remove from zwave." Deleting the entity from the configuration doesn't seem to remove it.

Feature Description

An ability to open a device and "remove from lock code manager"

Anything else?

No response

[Feature Request] Generated UI entities should have configuration name pre-pended

Describe the solution you'd like
Generated UI entities should have the configuration or lock name pre-pended to them

The entities that are generated for use via the custom:lock-code-manager UI do not contain any identifier as to what configuration or lock they are controlling.

If there are more than one lock defined it is hard to figure out what lock is going to be configured by the entity.

NOTE: My test setup does not presently have more than one lock defined that is usable (I only have one spare ZWave lock to play with) so I'm making some conjectures based on limited testing

ISSUE: Unable to install via HACS

Describe the bug
I added this integration to HACS as a custom repository (since it's not available in HACS yet despite the docs) When I try to install the integration I get an unknown error

Environment (please complete the following information):

  • OS: HassOS
  • Type of system that HA is running on: VM (kvm)
  • Home Assistant version: 2024.2.2
  • Hassio/Docker/Core? Hassio
  • Component version: N/A
  • Lock integration name: Virtual (yes, I know, ZWave only but I'm just trying to install it!)
  • Lock make and model: Virtual

Logs
The only logs I'm getting even though it says to check logs for details, there's no extra details!

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
    await func(hass, connection, msg)
  File "/config/custom_components/hacs/websocket/repository.py", line 234, in hacs_repository_download
    await repository.async_install()
  File "/config/custom_components/hacs/repositories/base.py", line 893, in async_install
    await self.async_install_repository(version=version)
  File "/config/custom_components/hacs/repositories/base.py", line 990, in async_install_repository
    raise HacsException("Could not download, see log for details")
custom_components.hacs.exceptions.HacsException: Could not download, see log for details

Additional context
Trying to get a feel for what this offers over Keymaster so I can determine how / if I should support it as a lock manager for my Rental Control integration.

[Feature Request] Switch from binary sensor to sensor

Problem Description

No response

Feature Description

Sensor can have one of four states:

  1. Disabled
  2. Disabling
  3. Enabled
  4. Enabling

or something of that sort

Anything else?

not sure if this is all that useful or not, need to think about it

[ISSUE] Adding a calendar after configuring a slot does not properly re-evaluate

What happened?

I configured a test lock with three slots but did not set the calendar option on a couple of the slots. After realizing my mistake when all 3 slots enabled with the defined code I reconfigured two of the slots with calendars. One calendar has an event currently on and the other calendar is off.

I noticed that the slot that has the calendar with no active event stayed with the indicator for the PIN being synced stayed on and inspecting the lock via ZWave-JS UI I did see that the slot was still enabled with a PIN.

Steps to reproduce the issue

  1. Configure a slot without a calendar but enabled and with a pin, save configuration
  2. Validate that PIN gets set on the lock and is enabled
  3. Reconfigure slot to use a calendar that does not have an active event
  4. See that the PIN stays synced and the slot stays enabled
  5. Toggle the Enable switch to off and then on
  6. Notice that slot properly removes the PIN and the slot goes to an Available state

Home Assistant Version

2024.02.5

What version of Lock Code Manager are you running?

0.2.5 (commit 9f265f7 from PR #49)

Lock make and model

Kwikset 910

Relevant log output

No response

Screenshots

No response

Anything else?

No response

TODO: Add test to check multiple config entries using the same lock

What happened?

we don't test this scenario so it is easy to have errors

Steps to reproduce the issue

...

Home Assistant Version

n/a

What version of Lock Code Manager are you running?

n/a

Lock make and model

No response

Relevant log output

No response

Screenshots

No response

Anything else?

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.