Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please explain the ETA attribute #109

Open
JeroenTuinstra opened this issue Oct 10, 2022 · 2 comments
Open

Please explain the ETA attribute #109

JeroenTuinstra opened this issue Oct 10, 2022 · 2 comments

Comments

@JeroenTuinstra
Copy link

Could someone please explain what the ETA attribute stands for. Is that literally 24hrs till the event? Because I have an event tomorrow morning and it gives me a ETA of 1, but the same day in the afternoon it gives me ETA of 2.

Had hoped the ETA was how many days removed from the current day.

@c2mfj
Copy link

c2mfj commented Apr 10, 2023

I am also looking for this. Some "today" events have an eta of 0 while others are 1. I'm trying to leverage this attribute for my HA automation.

@Olen
Copy link
Collaborator

Olen commented Apr 10, 2023

eta is whatever python counts as days until the event starts:

self._event_attributes["eta"] = (
start - datetime.now(start.tzinfo) + timedelta(days=1)
).days

The code could obviously be changed to do something else tht might be a better solution, please consider creating a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants