Skip to content

Remove expired 17track.net packages from entity registry#23001

Merged
bachya merged 2 commits into
home-assistant:devfrom
bachya:17track-fix
Apr 12, 2019
Merged

Remove expired 17track.net packages from entity registry#23001
bachya merged 2 commits into
home-assistant:devfrom
bachya:17track-fix

Conversation

@bachya
Copy link
Copy Markdown
Contributor

@bachya bachya commented Apr 11, 2019

Description:

This PR ensures that when a package is delivered, its corresponding sensor is removed from the UI and the entity registry.

Related issue (if applicable): fixes #22994

Pull request in home-assistant.io with documentation (if applicable): N/A

Example entry for configuration.yaml (if applicable):

sensor:
  - platform: seventeentrack 
    username: !secret 17track_username
    password: !secret 17track_password    

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 12, 2019

Codecov Report

Merging #23001 into dev will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev   #23001      +/-   ##
==========================================
- Coverage   93.95%   93.95%   -0.01%     
==========================================
  Files         448      448              
  Lines       36750    36750              
==========================================
- Hits        34529    34528       -1     
- Misses       2221     2222       +1
Impacted Files Coverage Δ
homeassistant/components/uk_transport/sensor.py 93.43% <0%> (-0.73%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 02347df...46f91d8. Read the comment docs.

@Spirituss
Copy link
Copy Markdown

Hello,
I've tested it and unfortunately items still stay on the registry after I mark them as 'Archived' in the 17track app.
HASS does see updated component, here are the lines from the log:

2019-04-11 21:58:06 WARNING (MainThread) [homeassistant.loader] You are using a custom component for seventeentrack.sensor which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.```

@bachya
Copy link
Copy Markdown
Contributor Author

bachya commented Apr 12, 2019

@Spirituss I believe what I've done here covers the case of a package being delivered, but misses the case of archiving it. I'm going to merge this and open a separate PR; will be in touch.

@bachya bachya merged commit 7d46ed0 into home-assistant:dev Apr 12, 2019
@ghost ghost removed the in progress label Apr 12, 2019
@bachya bachya deleted the 17track-fix branch April 12, 2019 16:31
@Spirituss
Copy link
Copy Markdown

Hello,
I’ve also tested and it doesn’t work. I see the items in the registry.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unavailable 17track sensors after successful delivery or archiving

4 participants