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

Pr1.3: AttributeError: type object 'GlobalVariables' has no attribute 'this_update_tine' #187

Closed Snuffy2 closed 1 year ago

Snuffy2 commented 1 year ago

Noted in HA logs. Looks like it might be a typo: this_update_tine

I can get debug logs if needed.

2023-08-27 14:23:35.903 ERROR (SyncWorker_5) [icloud3] type object 'GlobalVariables' has no attribute 'this_update_tine'
Traceback (most recent call last):
  File "/config/custom_components/icloud3/icloud3_main.py", line 262, in _polling_loop_5_sec_device
    self._main_5sec_loop_update_tracked_devices_icloud(Device)
  File "/config/custom_components/icloud3/icloud3_main.py", line 470, in _main_5sec_loop_update_tracked_devices_icloud
    if self._started_passthru_zone_delay(Device):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/icloud3/icloud3_main.py", line 862, in _started_passthru_zone_delay
    Device.selected_zone_results = self._select_zone(Device)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/icloud3/icloud3_main.py", line 1145, in _select_zone
    Device.iosapp_zone_enter_time = Gb.this_update_tine
                                    ^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'GlobalVariables' has no attribute 'this_update_tine'
2023-08-27 14:23:40.851 ERROR (SyncWorker_22) [icloud3] type object 'GlobalVariables' has no attribute 'this_update_tine'
Traceback (most recent call last):
  File "/config/custom_components/icloud3/icloud3_main.py", line 262, in _polling_loop_5_sec_device
    self._main_5sec_loop_update_tracked_devices_icloud(Device)
  File "/config/custom_components/icloud3/icloud3_main.py", line 470, in _main_5sec_loop_update_tracked_devices_icloud
    if self._started_passthru_zone_delay(Device):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/icloud3/icloud3_main.py", line 862, in _started_passthru_zone_delay
    Device.selected_zone_results = self._select_zone(Device)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/icloud3/icloud3_main.py", line 1145, in _select_zone
    Device.iosapp_zone_enter_time = Gb.this_update_tine
                                    ^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'GlobalVariables' has no attribute 'this_update_tine'
gcobb321 commented 1 year ago

A misspelled variable (tine vs. time) for a rarely hit piece of code.

Fixed in the pr1.4 zip file below: Unzip into the icloud3 directory.

This also includes Stationary Zone change to remove the Stationary Zone from HA when all devices have exited from it instead of moving it back to it's 'base' location. It worked in testing but I have not given it a real world test.

icloud3_v3-pr1.4.zip

BTW - I'll be away for the next 3-weeks but will have internet access for help and minor fixes if necessary but will not be posting any zip file updates.