I would love to be able to create automations based on an Uber that is soon to arrive. I have noticed that IFTTT has options for it using particular devices such as Hue, but I don’t have Hue and would prefer direct HA integration anyway. Preferably an expansion of the current Uber component.
Is this a possibility? Has anyone done something similar ? A search on here didn’t give me anything.
I’ve managed to cobble together a working Uber Eats sensor! I’ll eventually post in “Share Your Projects” once I make it less hacky and brittle. (Though I’m a bit worried about UE catching wind and changing their underlying API).
But in the meantime, I have Alexa telling me when the order is being prepared, when it’s being picked up, out for delivery, almost there, and completed! Along with a neat little (also hacky) lovelace card showing me the restaurant thumbnail, courier photo, and ETA.
(Apologies to @sparkydave for hijacking the thread. This doesn’t solve your Uber driver arrival problem. But I’m sure it could be modified easily to support that platform as well).
Hey @donkawechico,
I haven’t been able to test it yet (haven’t ordered anything!), but I was reading the code that decides between AM/PM for the timestamp, and I think there’ll be issues with lunch time orders.
The decision to offset 12 hours is based on the current time, not the delivery time. This will be an issue when for example, it’s 11:50 am, and the ETA is 12:05 pm. Your value template won’t add the 12 hours, and will instead return 12:05 am.
Would a better solution be to compare the two times (now and ETA)? If assuming the ETA is am would result in a time before now (or say earlier than 1 hour before now, to allow for late deliveries), then assume it should be PM.
I wonder if there’s also a similar issue for midnight/after midnight ETAs? I guess in that case you’d want to add 24 hours?
Ha, yes. I knew about the bug… and yet did nothing. This is my shame. (also had such a hard time figuring out how to work with timestamps at all that I just kinda stopped at the 98% case)
I’ll see if I can fix that edge case. In the meantime, if you figure it out first please post your solution on the gist and I’ll add!
I still haven’t managed to get this working successfully (I only just had another go, but adding the userUID to the cookie today). Is it still working for everybody else as is?
I find that it just never seems to return any data to the sensors, and I haven’t known how to debug the process. I found out how to issue a POST today and get the result, which is something. But by the time I got it working my delivery had arrived, and it just returned an empty array or orders. Hopefully adding the UUID did the trick, and I’ll see some data next time we put an order in.
FWIW, mine hasn’t worked for awhile now (and I made the danged thing ). I also tried adding the uuid and it didn’t immediately work.
But I haven’t devoted any serious time to getting it working again, maybe 10 minutes tops. I think the next time I work on this, it will be to make a formal core integration.