gcobb321 / icloud3_v3

iCloud3 v3, Development Version - This Repo/Version is used for development and testing of new and updated features. It is not the official release of iCloud3 v3, .
MIT License
169 stars 13 forks source link

v3.0 rc3a: AttributeError: 'DeletedDeviceEntry' object has no attribute 'name' #183

Closed Snuffy2 closed 1 year ago

Snuffy2 commented 1 year ago

Seeing this on every HA boot from icloud3 Debug Log:

2023-08-20 15:40:57 [__init__....:0136]  son2, son2s_iphone:
                                        {'ic3_devicename': 'son2s_iphone', 'fname': 'son2', 'picture': 'None', 'evlog_display_order': 0, 'unique_id': '', 'device_type': 'iphone', 'inzone_interval': 120.0, 'tracking_mode': 'track', 'famshr_devicename': "son2's iPhone", 'famshr_device_id': 'AUfPhNVVaDN0td++R46k333FzQOELVeCIKsMddjlx0f/V+8dPl6tcsrsLzCAJ0GwWyNMkl9zJETFm6CQbNuQe32qdHJq8io4RAxiROrX0j0dQG4pny978Fob33oXguqCNhd6wQwu333PT1Oul783LbwyBAnctspuQFhHWAd9ivAIZLAnwa1K', 'raw_model': 'iPhone14,6', 'model': '', 'model_display_name': '', 'fmf_email': 'None', 'fmf_device_id': '', 'iosapp_device': 'son2s_iphone_app', 'track_from_base_zone': 'home', 'track_from_zones': ['home'], 'old_devicename': 'son2s_iphone'}
2023-08-20 15:40:57 [__init__....:0136]  
2023-08-20 15:40:57 [__init__....:0142]  Setting up iCloud3 3.0rc3a - Using Integration method
2023-08-20 15:41:16 [device_track:0204]  Traceback (most recent call last):
  File "/config/custom_components/icloud3/device_tracker.py", line 189, in _get_dr_device_id_from_device_entry
    if device_entry.name in [DOMAIN, ICLOUD3, 'iCloud3 Integration']:
       ^^^^^^^^^^^^^^^^^
AttributeError: 'DeletedDeviceEntry' object has no attribute 'name'
2023-08-20 15:41:16 [device_track:0204]  Traceback (most recent call last):
  File "/config/custom_components/icloud3/device_tracker.py", line 189, in _get_dr_device_id_from_device_entry
    if device_entry.name in [DOMAIN, ICLOUD3, 'iCloud3 Integration']:
       ^^^^^^^^^^^^^^^^^
AttributeError: 'DeletedDeviceEntry' object has no attribute 'name'
2023-08-20 15:41:16 [device_track:0204]  Traceback (most recent call last):
  File "/config/custom_components/icloud3/device_tracker.py", line 189, in _get_dr_device_id_from_device_entry
    if device_entry.name in [DOMAIN, ICLOUD3, 'iCloud3 Integration']:
       ^^^^^^^^^^^^^^^^^
AttributeError: 'DeletedDeviceEntry' object has no attribute 'name'
2023-08-20 15:41:16 [device_track:0264]  Device Tracker entity created: device_tracker.snuffy2s_iphone, #1
2023-08-20 15:41:17 [device_track:0264]  Device Tracker entity created: device_tracker.wifes_iphone, #2
2023-08-20 15:41:17 [device_track:0264]  Device Tracker entity created: device_tracker.son1s_iphone, #3
2023-08-20 15:41:17 [device_track:0264]  Device Tracker entity created: device_tracker.son2s_iphone, #4
2023-08-20 15:41:17 [device_track:0109]  Device Tracker Entities: 4
2023-08-20 15:41:18 [device_track:0204]  Traceback (most recent call last):
  File "/config/custom_components/icloud3/device_tracker.py", line 189, in _get_dr_device_id_from_device_entry
    if device_entry.name in [DOMAIN, ICLOUD3, 'iCloud3 Integration']:
       ^^^^^^^^^^^^^^^^^
AttributeError: 'DeletedDeviceEntry' object has no attribute 'name'
2023-08-20 15:41:18 [device_track:0204]  Traceback (most recent call last):
  File "/config/custom_components/icloud3/device_tracker.py", line 189, in _get_dr_device_id_from_device_entry
    if device_entry.name in [DOMAIN, ICLOUD3, 'iCloud3 Integration']:
       ^^^^^^^^^^^^^^^^^
AttributeError: 'DeletedDeviceEntry' object has no attribute 'name'
2023-08-20 15:41:18 [device_track:0204]  Traceback (most recent call last):
  File "/config/custom_components/icloud3/device_tracker.py", line 189, in _get_dr_device_id_from_device_entry
    if device_entry.name in [DOMAIN, ICLOUD3, 'iCloud3 Integration']:
       ^^^^^^^^^^^^^^^^^
AttributeError: 'DeletedDeviceEntry' object has no attribute 'name'
gcobb321 commented 1 year ago

device_tracker.zip

Unzip that into the icloud3 directory and restart ha

Let me know if it starts so I can update the Release

Snuffy2 commented 1 year ago

Looking good. No longer seeing the error and the trackers appear to be updating.

gcobb321 commented 1 year ago

Thanks. I just updated everything and have uploaded a prelease to the old iCloud3 repository.

Snuffy2 commented 1 year ago

I won't be able to test again likely for a few days, but I just installed v3.0 rc3b which shows as pr1 in the ic3 logs.

The same errors as above are showing again.

2023-08-20 17:02:32.800 ERROR (MainThread) [icloud3] 'DeletedDeviceEntry' object has no attribute 'name'
Traceback (most recent call last):
File "/config/custom_components/icloud3/device_tracker.py", line 189, in _get_dr_device_id_from_device_entry
if device_entry.name in [DOMAIN, ICLOUD3, 'iCloud3 Integration']:
^^^^^^^^^^^^^^^^^
AttributeError: 'DeletedDeviceEntry' object has no attribute 'name'
gcobb321 commented 1 year ago

I did a quick update of the rc3b file which was not picked up as the latest release. I uploaded a pr1a (version=pr1) which is now the same version as in the iCloud3 general prerelease. I've deleted the old rc3b. Download the pr1a and you should be ok. This does not affect anything. It was code to get the area id for existing ic3 device trackers.

It should be OK now.. Thanks.. And I'm going on a trip next week for a few weeks.