Skip to content

Commit

Permalink
iCloud3 v3, Release Candidate 2
Browse files Browse the repository at this point in the history
  • Loading branch information
gcobb321 committed Aug 8, 2023
1 parent 851f313 commit 6bf9f5c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 4 additions & 4 deletions custom_components/icloud3/support/determine_interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,8 @@ def determine_interval(Device, FromZone):
FromZone.interval_method = interval_method
FromZone.dir_of_travel = dir_of_travel
if FromZone.zone_dist < 100:
FromZone.dir_of_travel_history += dir_of_travel[0:1].replace('i', '@')
monitor_msg = (f"DirectionHistory-{FromZone.format_dir_of_travel_history}<")
FromZone.dir_of_travel_history += dir_of_travel[0:1]
monitor_msg = (f"DirHist-{FromZone.format_dir_of_travel_history}")
post_monitor_msg(devicename, monitor_msg)

if inzone_home_flag: FromZone.dir_of_travel_history = ''
Expand Down Expand Up @@ -1124,8 +1124,8 @@ def copy_near_device_results(Device, FromZone):
FromZone.last_distance_str = NearFromZone.last_distance_str
FromZone.dir_of_travel = NearFromZone.dir_of_travel
if NearFromZone.zone_dist < 100:
FromZone.dir_of_travel_history += NearFromZone.dir_of_travel[0:1].replace('i', '@')
monitor_msg = (f"DirectionHistory-{FromZone.format_dir_of_travel_history}<")
FromZone.dir_of_travel_history += NearFromZone.dir_of_travel[0:1]
monitor_msg = (f"DirHist-{FromZone.format_dir_of_travel_history}")
post_monitor_msg(Device.devicename, monitor_msg)

FromZone.sensors.update(NearFromZone.sensors)
Expand Down
6 changes: 1 addition & 5 deletions custom_components/icloud3/support/icloud_data_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,11 +504,7 @@ def _get_devdata_useable_status(Device, data_source):
if (loc_time_ok
and Device.FromZone_BeingUpdated.interval_secs >= 15
and Device.is_passthru_timer_set is False):
loc_time_ok = (Device.FromZone_BeingUpdated.interval_secs > (loc_age_secs - 5))

# if Device.FromZone_BeingUpdated.interval_secs <= 60:
# _trace(Device.devicename, f"ok={loc_time_ok} interval={Device.FromZone_BeingUpdated.interval_secs} age={loc_age_secs - 5} "
# f"old={Device.FromZone_BeingUpdated.interval_secs > loc_age_secs - 5}")
loc_time_ok = (Device.FromZone_BeingUpdated.interval_secs > (loc_age_secs))

if loc_time_ok is False:
event_msg = f"Location Refreshing > Older than Update Interval ({secs_to_time_str(loc_age_secs)})"
Expand Down

0 comments on commit 6bf9f5c

Please sign in to comment.