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

Locative device trackers disappear after restarting HA #28877

Closed
davidbb opened this issue Nov 19, 2019 · 6 comments
Closed

Locative device trackers disappear after restarting HA #28877

davidbb opened this issue Nov 19, 2019 · 6 comments

Comments

@davidbb
Copy link
Contributor

davidbb commented Nov 19, 2019

Home Assistant release with the issue:

arch amd64
dev false
docker false
hassio false
os_name FreeBSD
os_version 11.2-STABLE
python_version 3.7.4
timezone America/Toronto
version 0.101.0
virtualenv false

Last working Home Assistant release (if known):
Unsure. Did not use Locative prior to the migration to Integrations config.

Integration:

Locative

Description of problem:
After creating a webhook through the Locative integration config flow, my devices are able to submit webhooks successfully. For each device sending POST requests to the webhook, a new device_tracker is created in HA. These device trackers can be linked to a person to track their state in HA.

The problem is that when HA is restarted, the device trackers that had been previously created no longer exist. This causes Persons to be shown as "unknown" (or "UNK" in badges). I've confirmed that the device trackers get re-created when the next POST request is sent to the webhook. I've also noticed that the entity registry does not list Locative device trackers.

Ideally, device trackers would persist after restarts and should be deleted manually if no longer needed. The state of the device tracker at HA startup should be the last state recorded prior to HA shutdown.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

No configuration.yaml because Locative is configured through the Integrations page

Traceback (if applicable):


Additional information:

@poudenes
Copy link

poudenes commented Nov 19, 2019

Same problem here. The created device_tracker is not shown in the locative integration. Its empty

@parampatwala
Copy link

Same issue here. Any solutions?

@MartinHjelmare
Copy link
Member

MartinHjelmare commented Jan 6, 2020

If the locative device has a unique id it's possible to implement the same solution as done for gpslogger:
https://github.com/home-assistant/home-assistant/blob/d1ed67f44a148c0c4aaaf7c2b4099cf7a0a2f295/homeassistant/components/gpslogger/device_tracker.py#L47-L64

This issue is a feature request and not really a bug as the integration is working according to current implementation. I'll close here now.

@radinsky
Copy link

radinsky commented Jan 13, 2020

@MartinHjelmare Why closed?

This issue is a feature request and not really a bug

It is an abnormal functionality that was broken several versions ago and should be fixed.

@MartinHjelmare
Copy link
Member

It's a feature request. We don't track feature requests in our issue tracker.

I've outlined the solution above. A PR with that is welcome.

@radinsky
Copy link

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

No branches or pull requests

6 participants