Exploring Zigbee Device Migration and Automation Tips

I’ve been diving into the world of smart home automation lately, and I’ve got a few questions and experiences to share. First off, I’m curious about migrating my Zigbee devices from my current setup to a new one. Specifically, I’m wondering if there’s a way to bulk transfer my devices from a Hubitat Elevation to a Home Assistant Yellow, or if I’ll have to move them one by one. It would be fantastic to streamline this process rather than doing it manually, which could save a lot of time and hassle.

On another note, I’ve been working on setting up an automation to notify me when my devices have low battery levels. I’ve tried writing a script, but I’m running into an error that says 'str object' has no attribute 'attributes'. I’ve included the script below for reference. If anyone has insights or suggestions on how to fix this, I’d be really grateful!

python

  • alias: device_low_batt
    trigger:
    • platform: time
      at: ‘19:00:00’
      mode: parallel
      action:
    • variables:
      low_batt_list: >-
      {% set sensors = states.sensor | selectattr(‘attributes.device_class’, ‘defined’) | selectattr(‘attributes.state_class’, ‘defined’) | selectattr(‘attributes.device_class’, ‘==’, ‘battery’) | selectattr(‘attributes.state_class’, ‘==’, ‘measurement’) | rejectattr(‘state’, ‘in’, [‘unavailable’, ‘unknown’]) | list %}
      {{ sensors | selectattr(“state”, “is_number”) | selectattr(“state”, “le”, “20”) | rejectattr(“state”, “==”, “100”) | rejectattr(“entity_id”, “search”, “.*_zwave”) | rejectattr(“entity_id”, “search”, “.iphone”) | map(attribute=“entity_id”) | list }}
    • choose:
      • conditions: ‘{{ low_batt_list | length > 0 }}’
        sequence:
        • repeat:
          for_each: ‘{{ low_batt_list }}’
          sequence:
          - service: persistent_notification.create
          data_template:
          title: Replace Battery
          message: The {{ repeat.item.attributes.friendly_name.split(" battery level")[0] }} sensor battery is at {{ repeat.item.state }}%, the battery type is {{ repeat.item.attributes.battery_type }}.
          notification_id: ‘{{ repeat.item.split(“.”)[1].split(“_battery_level”)[0] }}_low_batt_notification’

Lastly, I’ve noticed that my Ring Alarm integration has suddenly stopped working. I’m not sure if it’s a connectivity issue or something else. Does anyone have any troubleshooting tips or solutions for this? It would be really helpful to get this back up and running smoothly.

Overall, I’m really enjoying the journey of setting up my smart home, but there are definitely some bumps along the way. I’m looking forward to hearing from the community and learning more about how to optimize my setup!