ical-sensor-homeassistant icon indicating copy to clipboard operation
ical-sensor-homeassistant copied to clipboard

Please explain the ETA attribute

Open JeroenTuinstra opened this issue 2 years ago • 2 comments

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.

JeroenTuinstra avatar Oct 10 '22 10:10 JeroenTuinstra

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.

c2mfj avatar Apr 10 '23 15:04 c2mfj

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

https://github.com/tybritten/ical-sensor-homeassistant/blob/38c802bc105cb77a69f31fd770d62ad1e9f6857d/custom_components/ical/sensor.py#L154-L156

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

Olen avatar Apr 10 '23 15:04 Olen