Skip to content

Commit

Permalink
Fixed PR #3
Browse files Browse the repository at this point in the history
  • Loading branch information
jesmak committed Oct 11, 2024
1 parent 68b07a2 commit 83fa2c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion custom_components/posti_tracking/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"iot_class": "cloud_polling",
"name": "Posti package tracking",
"requirements": [],
"version": "1.0.3"
"version": "1.0.4"
}
4 changes: 2 additions & 2 deletions custom_components/posti_tracking/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ async def async_update(self):

delta = now - last_status_change

if status != 0 and delta.days <= self._stale_shipment_day_limit:
if status != 0 and status != 6 and delta.days <= self._stale_shipment_day_limit:
add_package(undelivered_packages, shipment, status, latest_event, self._language)
elif status == 0 and delta.days <= self._completed_shipment_days_shown:
elif (status == 0 or status == 6) and delta.days <= self._completed_shipment_days_shown:
add_package(delivered_packages, shipment, status, latest_event, self._language)

delivered_packages.sort(key=lambda x: x[ATTR_LATEST_EVENT_DATE], reverse=True)
Expand Down

0 comments on commit 83fa2c8

Please sign in to comment.