FutureTense/keymaster

After updating to v0.084 I get "unable to find referenced entities..." in my log

heyitsyang opened this issue · 12 comments

After updating to keymaster v0.084 i get the missing entities warnings in my log

Environment (please complete the following information):

  • OS: HassOS
  • Type of system that HA is running on: NUC
  • Home Assistant version: 2023.1.7
  • Hassio/Docker/Core?
  • Component version: [e.g. 0.1.2]
  • Z-Wave integration name: Zwave JS
  • Lock make and model: Schlage BE469

Logs

Logger: homeassistant.helpers.service
Source: helpers/service.py:637
First occurred: 8:43:57 AM (4 occurrences)
Last logged: 8:43:57 AM

Unable to find referenced entities automation.copy_front_door_accesscount_back_door_1, automation.copy_front_door_accesslimit_back_door_1, automation.copy_front_door_daterange_back_door_1, automation.copy_front_door_enabled_back_door_1, automation.copy_front_door_end_date_back_door_1, automation.copy_front_door_fri_back_door_1, automation.copy_front_door_fri_end_date_back_door_1, automation.copy_front_door_fri_inc_back_door_1, automation.copy_front_door_fri_start_date_back_door_1, automation.copy_front_door_mon_back_door_1, automation.copy_front_door_mon_end_date_back_door_1, automation.copy_front_door_mon_inc_back_door_1, automation.copy_front_door_mon_start_date_back_door_1, automation.copy_front_door_name_back_door_1, automation.copy_front_door_notify_back_door_1, automation.copy_front_door_pin_back_door_1, automation.copy_front_door_reset_back_door_1, automation.copy_front_door_sat_back_door_1, automation.copy_front_door_sat_end_date_back_door_1, automation.copy_front_door_sat_inc_back_door_1, automation.copy_front_door_sat_start_date_back_door_1, automation.copy_front_door_start_date_back_door_1, automation.copy_front_door_sun_back_door_1, automation.copy_front_door_sun_end_date_back_door_1, automation.copy_front_door_sun_inc_back_door_1, automation.copy_front_door_sun_start_date_back_door_1, automation.copy_front_door_thu_back_door_1, automation.copy_front_door_thu_end_date_back_door_1, automation.copy_front_door_thu_inc_back_door_1, automation.copy_front_door_thu_start_date_back_door_1, automation.copy_front_door_tue_back_door_1, automation.copy_front_door_tue_end_date_back_door_1, automation.copy_front_door_tue_inc_back_door_1, automation.copy_front_door_tue_start_date_back_door_1, automation.copy_front_door_wed_back_door_1, automation.copy_front_door_wed_end_date_back_door_1, automation.copy_front_door_wed_inc_back_door_1, automation.copy_front_door_wed_start_date_back_door_1 or it is/they are currently not available
Unable to find referenced entities automation.copy_front_door_accesscount_back_door_2, automation.copy_front_door_accesslimit_back_door_2, automation.copy_front_door_daterange_back_door_2, automation.copy_front_door_enabled_back_door_2, automation.copy_front_door_end_date_back_door_2, automation.copy_front_door_fri_back_door_2, automation.copy_front_door_fri_end_date_back_door_2, automation.copy_front_door_fri_inc_back_door_2, automation.copy_front_door_fri_start_date_back_door_2, automation.copy_front_door_mon_back_door_2, automation.copy_front_door_mon_end_date_back_door_2, automation.copy_front_door_mon_inc_back_door_2, automation.copy_front_door_mon_start_date_back_door_2, automation.copy_front_door_name_back_door_2, automation.copy_front_door_notify_back_door_2, automation.copy_front_door_pin_back_door_2, automation.copy_front_door_reset_back_door_2, automation.copy_front_door_sat_back_door_2, automation.copy_front_door_sat_end_date_back_door_2, automation.copy_front_door_sat_inc_back_door_2, automation.copy_front_door_sat_start_date_back_door_2, automation.copy_front_door_start_date_back_door_2, automation.copy_front_door_sun_back_door_2, automation.copy_front_door_sun_end_date_back_door_2, automation.copy_front_door_sun_inc_back_door_2, automation.copy_front_door_sun_start_date_back_door_2, automation.copy_front_door_thu_back_door_2, automation.copy_front_door_thu_end_date_back_door_2, automation.copy_front_door_thu_inc_back_door_2, automation.copy_front_door_thu_start_date_back_door_2, automation.copy_front_door_tue_back_door_2, automation.copy_front_door_tue_end_date_back_door_2, automation.copy_front_door_tue_inc_back_door_2, automation.copy_front_door_tue_start_date_back_door_2, automation.copy_front_door_wed_back_door_2, automation.copy_front_door_wed_end_date_back_door_2, automation.copy_front_door_wed_inc_back_door_2, automation.copy_front_door_wed_start_date_back_door_2 or it is/they are currently not available
Unable to find referenced entities automation.copy_front_door_accesscount_back_door_3, automation.copy_front_door_accesslimit_back_door_3, automation.copy_front_door_daterange_back_door_3, automation.copy_front_door_enabled_back_door_3, automation.copy_front_door_end_date_back_door_3, automation.copy_front_door_fri_back_door_3, automation.copy_front_door_fri_end_date_back_door_3, automation.copy_front_door_fri_inc_back_door_3, automation.copy_front_door_fri_start_date_back_door_3, automation.copy_front_door_mon_back_door_3, automation.copy_front_door_mon_end_date_back_door_3, automation.copy_front_door_mon_inc_back_door_3, automation.copy_front_door_mon_start_date_back_door_3, automation.copy_front_door_name_back_door_3, automation.copy_front_door_notify_back_door_3, automation.copy_front_door_pin_back_door_3, automation.copy_front_door_reset_back_door_3, automation.copy_front_door_sat_back_door_3, automation.copy_front_door_sat_end_date_back_door_3, automation.copy_front_door_sat_inc_back_door_3, automation.copy_front_door_sat_start_date_back_door_3, automation.copy_front_door_start_date_back_door_3, automation.copy_front_door_sun_back_door_3, automation.copy_front_door_sun_end_date_back_door_3, automation.copy_front_door_sun_inc_back_door_3, automation.copy_front_door_sun_start_date_back_door_3, automation.copy_front_door_thu_back_door_3, automation.copy_front_door_thu_end_date_back_door_3, automation.copy_front_door_thu_inc_back_door_3, automation.copy_front_door_thu_start_date_back_door_3, automation.copy_front_door_tue_back_door_3, automation.copy_front_door_tue_end_date_back_door_3, automation.copy_front_door_tue_inc_back_door_3, automation.copy_front_door_tue_start_date_back_door_3, automation.copy_front_door_wed_back_door_3, automation.copy_front_door_wed_end_date_back_door_3, automation.copy_front_door_wed_inc_back_door_3, automation.copy_front_door_wed_start_date_back_door_3 or it is/they are currently not available
Unable to find referenced entities automation.copy_front_door_accesscount_back_door_4, automation.copy_front_door_accesslimit_back_door_4, automation.copy_front_door_daterange_back_door_4, automation.copy_front_door_enabled_back_door_4, automation.copy_front_door_end_date_back_door_4, automation.copy_front_door_fri_back_door_4, automation.copy_front_door_fri_end_date_back_door_4, automation.copy_front_door_fri_inc_back_door_4, automation.copy_front_door_fri_start_date_back_door_4, automation.copy_front_door_mon_back_door_4, automation.copy_front_door_mon_end_date_back_door_4, automation.copy_front_door_mon_inc_back_door_4, automation.copy_front_door_mon_start_date_back_door_4, automation.copy_front_door_name_back_door_4, automation.copy_front_door_notify_back_door_4, automation.copy_front_door_pin_back_door_4, automation.copy_front_door_reset_back_door_4, automation.copy_front_door_sat_back_door_4, automation.copy_front_door_sat_end_date_back_door_4, automation.copy_front_door_sat_inc_back_door_4, automation.copy_front_door_sat_start_date_back_door_4, automation.copy_front_door_start_date_back_door_4, automation.copy_front_door_sun_back_door_4, automation.copy_front_door_sun_end_date_back_door_4, automation.copy_front_door_sun_inc_back_door_4, automation.copy_front_door_sun_start_date_back_door_4, automation.copy_front_door_thu_back_door_4, automation.copy_front_door_thu_end_date_back_door_4, automation.copy_front_door_thu_inc_back_door_4, automation.copy_front_door_thu_start_date_back_door_4, automation.copy_front_door_tue_back_door_4, automation.copy_front_door_tue_end_date_back_door_4, automation.copy_front_door_tue_inc_back_door_4, automation.copy_front_door_tue_start_date_back_door_4, automation.copy_front_door_wed_back_door_4, automation.copy_front_door_wed_end_date_back_door_4, automation.copy_front_door_wed_inc_back_door_4, automation.copy_front_door_wed_start_date_back_door_4 or it is/they are currently not available```

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

Additional context
I did not have these log entries with the previous version.

Regenerate the scripts.
There's a keymaster service call for this under DevTools->Services

I've performed the regeneration using keymaster.generate_package, but the log warnings persist. I can see that the entities starting with automation.keymaster_copy_front_door... exist, but it appears it still looks for the automation without the keymaster_ in front.

Have you restarted Home Assistant as well?

Here are my lines 833-878 in keymaster_child.yaml. Is there an elegant/proper way to fix this other than just editing this file? If I edit, will subsequent regeneration of scripts work properly? i.e. is this a one off on my system or is this a bug?

###################  script:  ####################
script:
  keymaster_LOCKNAME_copy_from_parent_TEMPLATENUM:
    sequence:
      - service: automation.trigger
        data: {}
        target:
          entity_id:
            - automation.copy_PARENTLOCK_name_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_pin_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_enabled_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_notify_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_reset_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_accesslimit_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_accesscount_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_daterange_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_start_date_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_end_date_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_sun_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_sun_inc_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_sun_start_date_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_sun_end_date_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_mon_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_mon_inc_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_mon_start_date_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_mon_end_date_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_tue_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_tue_inc_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_tue_start_date_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_tue_end_date_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_wed_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_wed_inc_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_wed_start_date_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_wed_end_date_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_thu_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_thu_inc_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_thu_start_date_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_thu_end_date_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_fri_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_fri_inc_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_fri_start_date_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_fri_end_date_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_sat_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_sat_inc_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_sat_start_date_LOCKNAME_TEMPLATENUM
            - automation.copy_PARENTLOCK_sat_end_date_LOCKNAME_TEMPLATENUM

Playing with the template won't help. Home Assistant is reporting that your entities are missing for some reason.
Does automation.copy_front_door_accesscount_back_door_1 show up in DevTools->States ?

The entity automation.copy_front_door_accesscount_back_door_1 does not exist, but automation.keymaster_copy_front_door_accesscount_back_door_1 exists.

Thanks for hanging in there, I have a fix on the way.

v0.0.85 should fix you right up.

Make sure to do the keymaster.generate after updating and restarting Home Assistant to get the files re-generated.

I still have the same warning in my logs. I've updated, confirmed the update, restarted HA, run keymaster.generate_package, cleared my logs, and restarted HA, with no luck. I then did a system reboot, still no luck.

I have the automation.keymaster_copy_front_door_accessaccount_back_door_1 and others in the list of entities. But the log warning Unable to find referenced entities automation.copy_front_door_accesscount_back_door_1 (and others) still persists.

Check your packages directory for a file that may not have gotten cleaned up.

Sorry, I didn't realize I needed to run keymaster.generate_package once for each lock. I thought running it once for may parent lock was enough. No more wrnings in the log now.

Thanks so much for your help!