FutureTense / keymaster

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

[Feature Request] Allow option for !include_dir_merge_named #274

Open kylerw opened 2 years ago

kylerw commented 2 years ago

I already use !include_dir_merge_named for my packages which is not compatible with the current generated yaml files

chelming commented 2 years ago

could you just make a separate packages directory at the same level as your packages directory? e.g., keymaster_packages/ and select that?

I put everything in a settings/ directory, like settings/template, settings/input_boolean, settings/packages, and would just create settings/keymaster_packages

edit: oh. I guess not since it still needs to be sourced.

chelming commented 2 years ago

so. weirdly. I don't have packages defined in my config and it still loaded all the entities it created in its custom directory...

maybe my suggestion would work.

raman325 commented 2 years ago

you can have the same key in your configuration twice by namespacing them, example: https://github.com/raman325/homeassistant-config/blob/master/configuration.yaml#L30-L31

So keep your configuration but add packages keymaster: !include_dir_named keymaster_packages. I can't say for sure that this will work since it's under homeassistant but give it a try

kylerw commented 2 years ago

Yes, tried that option to no avail. I ended up moving to the dir_named method which took some time to edit my other packages but was the simplest solution for now.

-Kyler W

On Fri, Apr 8, 2022 at 1:07 PM Raman Gupta @.***> wrote:

you can have the same key in your configuration twice by namespacing them, example: https://github.com/raman325/homeassistant-config/blob/master/configuration.yaml#L30-L31

So keep your configuration but add packages keymaster: !include_dir_named keymaster_packages. I can't say for sure that this will work since it's under homeassistant but give it a try

— Reply to this email directly, view it on GitHub https://github.com/FutureTense/keymaster/issues/274#issuecomment-1093256283, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC2RLAUUD4VUF4OHEPSKA3VEB7W3ANCNFSM5SZ3X6CA . You are receiving this because you authored the thread.Message ID: @.***>

fireheadman commented 2 years ago

I'm in the same boat.. I have a split configuration with HA. originally I used a "integrations" folder instead of "packages"..... I did rename it so it is no "packages".

  #packages: !include_dir_named integrations
  packages: !include_dir_named packages

image

I can attempt to load my first door lock in keymaster, it will create the packages/keymaster/frontdoor folder, I can see all the yaml files in there.

...but the fun starts when I restart HA, then it crashes. I have to move quickly to nuke the packages/keymaster and custom_components/keymaster else it will continue crashing HA. Unsure if maybe I need to update my split configuration? I'm open to ideas... The zwave locks were my last devices migrated from smartthings.

firstof9 commented 2 years ago

You can modify the template files to fit the method you've used for your packages directory.

I also use a split config, but I do it at the lower level, much easier.

...
## INCLUDES ##
light: !include light.yaml
media_player: !include media_player.yaml
group: !include groups.yaml
script: !include_dir_merge_named scripts/
input_select: !include input_select.yaml
sensor: !include_dir_merge_list sensors
...
fireheadman commented 2 years ago

I will try this out today.... noticed with my 3x failed attempts I had a ton of "helpers" to clean up.... didn't realized each attempt it created frontdoor_1, frontdoor_2, frontdoor_3....etc..etc for each helper. Must have been 60+ of them to clean up.

also was not wanting to modify from the out of the box install in case it breaks the ability to update the code on future releases.

firstof9 commented 2 years ago

It could, if you fork the repo and apply your changes on top of any incoming changes you'd be covered tho.

fireheadman commented 2 years ago

spent most of today cleaning up my split configuration.... got it about 90% better, then re-attempted the installation. this time i am not experiencing any fatal stops on HA, did a couple more restarts to be safe.

So now I will get back to the install docs/video and hook up my locks. Appreciate the guidance/support

2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_turn_on_access_limit_frontdoor_1] Initialized trigger keymaster_turn_on_access_limit_frontdoor_1
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_synchronize_codeslot_frontdoor_1] Initialized trigger keymaster_synchronize_codeslot_frontdoor_1
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_turn_on_access_limit_frontdoor_2] Initialized trigger keymaster_turn_on_access_limit_frontdoor_2
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_synchronize_codeslot_frontdoor_2] Initialized trigger keymaster_synchronize_codeslot_frontdoor_2
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_turn_on_access_limit_frontdoor_3] Initialized trigger keymaster_turn_on_access_limit_frontdoor_3
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_synchronize_codeslot_frontdoor_3] Initialized trigger keymaster_synchronize_codeslot_frontdoor_3
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_turn_on_access_limit_frontdoor_4] Initialized trigger keymaster_turn_on_access_limit_frontdoor_4
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_synchronize_codeslot_frontdoor_4] Initialized trigger keymaster_synchronize_codeslot_frontdoor_4
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_turn_on_access_limit_frontdoor_5] Initialized trigger keymaster_turn_on_access_limit_frontdoor_5
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_synchronize_codeslot_frontdoor_5] Initialized trigger keymaster_synchronize_codeslot_frontdoor_5
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_frontdoor_reset_code_slot] Initialized trigger keymaster_frontdoor Reset Code Slot
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_frontdoor_lock_notifications] Initialized trigger keymaster_frontdoor Lock Notifications
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_frontdoor_user_notifications] Initialized trigger keymaster_frontdoor User Notifications
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_frontdoor_door_open_and_close] Initialized trigger keymaster_frontdoor Door Open and Close
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_frontdoor_changed_code] Initialized trigger keymaster_frontdoor Changed Code
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_frontdoor_reset] Initialized trigger keymaster_frontdoor Reset
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_frontdoor_decrement_access_count] Initialized trigger keymaster_frontdoor Decrement Access Count
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_frontdoor_locked] Initialized trigger keymaster_frontdoor_locked
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_turn_off_retry_frontdoor] Initialized trigger keymaster_turn_off_retry_frontdoor
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_retry_bolt_closed_frontdoor] Initialized trigger keymaster_retry_bolt_closed_frontdoor
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_frontdoor_opened] Initialized trigger keymaster_frontdoor_opened
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_frontdoor_unlocked_start_autolock] Initialized trigger keymaster_frontdoor_unlocked_start_autolock
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_frontdoor_timer_finished] Initialized trigger keymaster_frontdoor_timer_finished
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_frontdoor_timer_canceled] Initialized trigger keymaster_frontdoor_timer_canceled
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_frontdoor_disable_auto_lock] Initialized trigger keymaster_frontdoor_disable_auto_lock
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_frontdoor_enable_auto_lock] Initialized trigger keymaster_frontdoor_enable_auto_lock
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_frontdoor_initialize] keymaster_frontdoor_initialize: Running automation actions
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_frontdoor_initialize] keymaster_frontdoor_initialize: Executing step call service
2022-05-23 23:16:53 INFO (MainThread) [homeassistant.components.automation.keymaster_frontdoor_initialize] Initialized trigger keymaster_frontdoor_initialize
2022-05-23 23:16:54 INFO (MainThread) [homeassistant.components.automation.keymaster_frontdoor_initialize] keymaster_frontdoor_initialize: Executing step call service
2022-05-23 23:16:54 INFO (MainThread) [custom_components.hacs] Stage changed: HacsStage.RUNNING
traviscook21 commented 1 year ago

@fireheadman - can you provide an example of what you ended up doing. Trying to do something similar

fireheadman commented 1 year ago

trying to figure out how to PM you on here or if you are in a HA forum, then I can send you more info... didn't want to clog up this thread with off topic stuff PM me on the HA community forums, I'm 'fireheadman' for handle there

gravyflex commented 10 months ago

I'm in the same boat.. I have a split configuration with HA. originally I used a "integrations" folder instead of "packages"..... I did rename it so it is no "packages".

  #packages: !include_dir_named integrations
  packages: !include_dir_named packages

image

I can attempt to load my first door lock in keymaster, it will create the packages/keymaster/frontdoor folder, I can see all the yaml files in there.

...but the fun starts when I restart HA, then it crashes. I have to move quickly to nuke the packages/keymaster and custom_components/keymaster else it will continue crashing HA. Unsure if maybe I need to update my split configuration? I'm open to ideas... The zwave locks were my last devices migrated from smartthings.

I'm in the same boat with no idea how to fix this...