Ludy87 / xplora_watch

Xplora® Watch Home Assistant Integration
MIT License
50 stars 6 forks source link

🏗️ Add service to update watch location/other information on demand #72

Closed lakofsth closed 2 years ago

lakofsth commented 2 years ago

Is your feature request related to a problem? Please describe.

The update interval defaults to 180 seconds, which unfortunately appears to cause accelerated battery drain on the device as it is polled at the interval. I have increased the default interval to save battery, but this means that some automations will be delayed (e.g. arriving home, disarming routines activated when out of the home).

Describe the feature you want

I would like a service I can call in HA to request an update to the location/other information for a specific watch.

Use-case: presence is detected at home, but no watch device is detected in the zone. This triggers an update for the watch location, which then triggers other actions related to person(s) being at home.

Use-case: guardian wants to know where their child is, but without adjusting the update frequency for the integration.

Additional context

No response

github-actions[bot] commented 2 years ago

:wave: @lakofsth, your proposal will be considered. Please have some patience. This action was performed automatically.

Ludy87 commented 2 years ago

Hi @lakofsth, I did some experimenting and came to this solution. It's not the best, unfortunately, as it polls all clocks.

Maybe @ravor-org has another suggestion or idea.

lakofsth commented 2 years ago

Thanks for the quick response! I'll try it out. I only have one watch so this satisfies my needs fully.

ravor-org commented 2 years ago

I indeed have a suggestion: we could use the update method (service: homeassistant.update_entity) and force a update like with the just implemented service.

Ludy87 commented 2 years ago

with an automation I have it in the test. I just can't differentiate between two watches. Every attempt failed.

Ludy87 commented 2 years ago
alias: See Watch
description: ""
trigger:
  - platform: time
    at: "14:15:00"
condition: []
action:
  - service: xplora_watch.see
    data: {}
mode: single