Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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 3 commits into from
Nov 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions source/_components/sensor.17track.markdown
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`
Copy link

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?

Copy link
Contributor Author

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:

  1. Does the integration produce more than one platform (sensor, binary_sensor, etc.)?
  2. Does the integration need to provide services?

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.

Copy link

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!

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 %}
Binary file added source/images/supported_brands/17track.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.