Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device moved to (center of) zone when oldlocation happens #258

Open
SaturnusDJ opened this issue Mar 21, 2023 · 1 comment
Open

Device moved to (center of) zone when oldlocation happens #258

SaturnusDJ opened this issue Mar 21, 2023 · 1 comment

Comments

@SaturnusDJ
Copy link

SaturnusDJ commented Mar 21, 2023

Situation: A non HA iOS app user is in a zone. At one point the location of the device is old. Then the device is being moved onto the center of the zone. (This is the problem, why does that happen.) Then the connection is back and the device is moved to the actual location (in the zone but closer to the edge). Repeat x30 because poor connection. The result is a very painted map in HA.

Config:

inzone_intervals:
  - inzone_interval: 10 min
  - no_iosapp: 10 min
max_interval: '10 min'
center_in_zone: false
stationary_inzone_interval: '10 min'
stationary_still_time: '10 min'
stationary_zone_offset: '210, -700'
#travel_time_factor: .6
distance_method: calc

#--Accuracy Parameters--------------------------------------------
gps_accuracy_threshold: 200
ignore_gps_accuracy_inzone: false
old_location_threshold: '15 min'

#--Formatting Parameters------------------------------------------
unit_of_measurement: km
time_format: 24
display_zone_format: zone

Having these new automations to force when location is not received:


- alias: Test - iCloud3 interval is 15 min > force resume+locate
  trigger:
  - platform: template
    value_template: "{{ states.sensor.iphone_interval.state == '5 min' }}"
  - platform: template
    value_template: "{{ states.sensor.iphone_interval.state == '30 min' }}"
  - platform: template
    value_template: "{{ states.sensor.iphone_interval.state == '60 min' }}"
  - platform: template
    value_template: "{{ states.sensor.iphone_interval.state == '1 hrs' }}"
  - platform: template
    value_template: "{{ states.sensor.iphone_interval.state == '2 hrs' }}"
  action:
  - service: device_tracker.icloud3_update
    data:
      command: resume
  - service: device_tracker.icloud3_update
    data:
      command: location

- alias: Test - iCloud3 paused > force resume+locate
  trigger:
  - platform: template
    value_template: "{{ states.sensor.iphone_badge.state == 'PAUSED' }}"
  action:
        repeat:
          while:
            - "{{ states.sensor.iphone_badge.state == 'PAUSED' }}"
            - condition: template
              value_template: "{{ repeat.index <= 999 }}"
          sequence:
            - service: device_tracker.icloud3_update
              data:
                command: resume
            - service: device_tracker.icloud3_update
              data:
                command: location
            - delay: 60
@SaturnusDJ
Copy link
Author

Kick. Just to be clear: also happens without those automations. It started happening after I made zones this user often is in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant