gcobb321 / icloud3

iCloud3 v3 - iCloud3 is an advanced iDevice tracker that uses Apple iCloud account and HA Companion App data for presence detection and location based automations.
MIT License
546 stars 54 forks source link

ERROR: iCloud3_Device' object has no attribute 'interval_secs #284

Closed kess78 closed 11 months ago

kess78 commented 11 months ago

Hello guys, I have my log full of the following errors

Logger: icloud3
Source: custom_components/icloud3/icloud3_main.py:378
Integration: iCloud3 v3 ([documentation](https://gcobb321.github.io/icloud3_v3_docs/#/), [issues](https://github.com/gcobb321/icloud3_v3/issues))
First occurred: 24 ottobre 2023 alle ore 17:38:00 (6369 occurrences)
Last logged: 00:38:30

'iCloud3_Device' object has no attribute 'interval_secs'
Traceback (most recent call last):
  File "/config/custom_components/icloud3/icloud3_main.py", line 271, in _polling_loop_5_sec_device
    self._main_5sec_loop_update_tracked_devices_iosapp(Device)
  File "/config/custom_components/icloud3/icloud3_main.py", line 378, in _main_5sec_loop_update_tracked_devices_iosapp
    if Device.next_update_secs <= Gb.this_update_secs and Device.interval_secs > 30:
                                                          ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'iCloud3_Device' object has no attribute 'interval_secs'
gcobb321 commented 11 months ago

The error was encountered when the ios app was the primary data source (icloud account not used for the device) and the update time was reached. It was checking to see if the location data was old and it appears that this was the during the initial locate.

I've fixed this in v3.0.rc8. I have attached the file (not released yet). Unzip it into the icloud directory.

icloud3_v3-rc8.zip

kess78 commented 11 months ago

Hi @gcobb321, thx a lot for sharing the next rc, it seems to fix the problem.. My log is now clean 👌