Skip to content
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ This integration includes beta features for adding, editing, and deleting parcel
- `next_delivery_carrier`: The converted (from carrier code) carrier name of the next shipment arriving.

### Raw Data Sensor
From v1.2.0 another sensor entity is added, called `sensor.parcel_raw_shipment_data`. It contains raw json data from the API pull for debugging or custom templating. It has the following attributes:
From v1.2.0 another sensor entity is added, containing raw json data from the API pull for debugging or custom templating. Its entity ID is `sensor.parcel_raw_shipment_data` for installs configured before roughly HA 2026.4, and `sensor.parcel_app_parcel_raw_shipment_data` for newer setups (check Developer Tools → States for yours). Note this sensor is disabled by default and needs to be enabled from the entity settings. It has the following attributes:

#### Raw Data Sensor Attributes
As per the [Parcel App API documentation](https://parcelapp.net/help/api.html)
Expand Down Expand Up @@ -214,4 +214,4 @@ This integration uses the Parcel REST API. Special thanks to the developer of th

* * * * *

**Note:** This integration is unofficial and not affiliated with the Parcel API developers.
**Note:** This integration is unofficial and not affiliated with the Parcel API developers.
10 changes: 6 additions & 4 deletions docs/community_templates/auto_entities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ card:
filter:
template: >
{# Fetch parcel data from sensor #}
{% set parcels = state_attr('sensor.parcel_raw_shipment_data', 'deliveries') or [] %}
{# Entity ID depends on the HA core version the integration was first set up on (naming migration ~HA 2026.4) #}
{% set raw_entity = 'sensor.parcel_app_parcel_raw_shipment_data' if states.sensor.parcel_app_parcel_raw_shipment_data is not none else 'sensor.parcel_raw_shipment_data' %}
{% set parcels = state_attr(raw_entity, 'deliveries') or [] %}
{% set enroute = namespace(list=[]) %}
{% set delivered = namespace(list=[]) %}

Expand All @@ -31,7 +33,7 @@ filter:
{% if statuscode in [2, 3, 4] %}
{% set row = {
'type': 'custom:template-entity-row',
'entity': 'sensor.parcel_raw_shipment_data',
'entity': raw_entity,
'name': '[' ~ carrier ~ '] ' ~ name ~ ' - ' ~ barcode,
'state': 'En route',
'secondary': 'Expected: ' ~ time,
Expand All @@ -41,7 +43,7 @@ filter:
{% elif statuscode == 0 %}
{% set row = {
'type': 'custom:template-entity-row',
'entity': 'sensor.parcel_raw_shipment_data',
'entity': raw_entity,
'name': '[' ~ carrier ~ '] ' ~ name ~ ' - ' ~ barcode,
'state': 'Delivered',
'secondary': 'Delivered: ' ~ time,
Expand Down Expand Up @@ -70,4 +72,4 @@ filter:
]
show_empty: true
grid_options:
columns: full
columns: full
3 changes: 2 additions & 1 deletion docs/community_templates/bubble_card.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

type: markdown
content: >-
{% set raw = state_attr('sensor.parcel_raw_shipment_data', 'deliveries') %}
{% set raw = state_attr('sensor.parcel_app_parcel_raw_shipment_data', 'deliveries')
or state_attr('sensor.parcel_raw_shipment_data', 'deliveries') %}
{% set ns = namespace(deliveries = []) %}
{% for order in raw | selectattr('status_code','>',0) %}
{% if order.date_expected is defined %}
Expand Down
Loading