glance- / postnord

A custom_component for home-assistant to track PostNord packages via their api.
Apache License 2.0
14 stars 3 forks source link

Feature Request - use findByNotificationCode instead #1

Open kiddouk opened 5 years ago

kiddouk commented 5 years ago

Hello,

I just found your HA component and this is quite neat ! Great work. One thing that strikes me when it comes to pushing automation further would be to use findByNotificationCode instead so all I would have to do would be to insert my hone number and HA would find all the packages in transit that have this notification code attached to it (the same way the postnord app is currently working).

Once the package status is in "DELIVERED", then HA could expire the interests in that package after a day for example.

I have no idea how if HA can support such behavior (one ID and multiple items returned) but let me know what you think.

Cheers,

glance- commented 5 years ago

findByNotificationCode requires notificationPhoneNumber and notificationCode , ie the one you get in a SMS, and thats not known on beforehand.

The official app uses some user registration to get access to a private api which then can give you all your packages. Maybe I'll reverse-engineer that some day.