Skip to content

Commit

Permalink
Set direction to "far away" if distance >= 400 km.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodpayne committed Apr 17, 2024
1 parent e164304 commit 7aeadb1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion custom_components/person_location/reverse_geocode.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,9 @@ def handle_reverse_geocode(call):
distance_from_home / METERS_PER_MILE, 1
)

if speed_during_interval <= 0.5:
if distance_from_home >= 400:
direction = "far away"
elif speed_during_interval <= 0.5:
direction = "stationary"
elif old_distance_from_home > distance_from_home:
direction = "toward home"
Expand Down

0 comments on commit 7aeadb1

Please sign in to comment.