-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Add docs for 17track.net sensor platform #7303
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
layout: page | ||
title: "17track.net" | ||
description: "Instructions on how to use 17track.net data within Home Assistant" | ||
date: 2018-10-31 10:42 | ||
sidebar: true | ||
comments: false | ||
sharing: true | ||
footer: true | ||
logo: 17track.jpg | ||
ha_category: Postal Service | ||
ha_release: 0.83 | ||
ha_iot_class: "Cloud Polling" | ||
--- | ||
|
||
The 17track.net sensor platform allows users to get package data tied to their | ||
17track.net account. The platform creates both summary sensors, which show the | ||
number of packages in a current state (e.g., "In Transit"), as well as | ||
individual sensors for each package within the account. | ||
|
||
## {% linkable_title Configuration %} | ||
|
||
To enable the platform, add the following lines to your `configuration.yaml` | ||
file: | ||
|
||
```yaml | ||
sensor: | ||
- platform: seventeentrack | ||
username: <EMAIL ADDRESS> | ||
password: <PASSWORD> | ||
``` | ||
|
||
{% configuration %} | ||
username: | ||
description: The email address associated with your 17track.net account. | ||
required: true | ||
type: string | ||
password: | ||
description: The password associated with your 17track.net account. | ||
required: true | ||
type: string | ||
show_archived: | ||
description: Whether sensors should be created for archived packages. | ||
required: false | ||
type: boolean | ||
default: false | ||
show_delivered: | ||
description: Whether sensors should be created for delivered packages. | ||
required: false | ||
type: boolean | ||
default: false | ||
{% endconfiguration %} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is manual configuration.yaml the only option?
Not via a configuration entry in the UI like before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. The UI method was originally introduced so that users could add individual packages without needing to update
configuration.yaml
. Unfortunately, the method for tracking individual packages via 17track.net has been altered; until I figure out the mechanism, the underlying library (py17track
) only allows account-driven package tracking.Given that this use case is off the table, for now, there is one primary thing I review when considering whether UI config is appropriate: can the integration justify being a full-blown component (beyond the UI config use case)? Tactically:
sensor
,binary_sensor
, etc.)?If the answer is no, then I leave the integration as a platform (in this case, as a
sensor
platform). At some point, the HASS core will have a way for existing platforms to implement UI config without needing to transition to a full-blown component; when that occurs, I'll definitely take another look.Hope that makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, thanks for explaining your decision!