17track sensor

I wanted a way to show parcels in transit using the 17 track plugin,
however it has a limiting feature that it does not automatically add new parcels to Lovelace.
“Monster Card” is now deprected. Now i used “Auto Entities” so thanks @thomasloven for this feature i have now got a plugin that displays all the parcels when added to 17track,
I then wanted to have the status reflected in the icon, i am not very good with templates and struggled to find a way to do that, so used multiple filters to show each status with a set icon,
let me know if there is a better way to do it , and the code here might help somebody else.

cards:
  - entities:
      - entity: sensor.seventeentrack_packages_in_transit
      - entity: sensor.seventeentrack_packages_not_found
      - entity: sensor.seventeentrack_packages_undelivered
      - entity: sensor.seventeentrack_packages_returned
    title: Shipping Overview
    type: entities
  - card:
      title: Packages
      type: entities
    filter:
      include:
        - entity_id: sensor.*track_package_*
          state: In Transit
          options:
            secondary_info: last-changed
            icon: 'mdi:truck'
        - entity_id: sensor.*track_package_*
          state: Not Found
          options:
            secondary_info: last-changed
            icon: 'mdi:alert-circle-outline'
        - entity_id: sensor.*track_package_*
          state: Returned
          options:
            secondary_info: last-changed
            icon: 'mdi:keyboard-return'
        - entity_id: sensor.*track_package_*
          state: Undelivered
          options:
            secondary_info: last-changed
            icon: 'mdi:alert-outline'
    type: 'custom:auto-entities'
type: vertical-stack
4 Likes