franc6 / ics_calendar

Provides an ICS (icalendar) platform for the Home Assistant calendar
Apache License 2.0
146 stars 22 forks source link

Add units to connection_timeout option in the documentation #124

Closed joluas closed 3 months ago

joluas commented 7 months ago

Hello,

Today I was got the following error message in HA:

Updating ics_calendar calendar took longer than the scheduled update interval 0:01:00

After reading the documentation, I noticed that I could use connection_timeout option to solve this issue. However, the value is only described as a float value, but I have no idea if it is seconds, minutes or what kind of unit this field takes. I changed the configuration as follows:

ics_calendar:
  calendars:
    - name: "TWC"
      url: "URLRataAlada"
      include_all_day: false
      connection_timeout: 300

Afterwards I got the following warning from HA:

Update of calendar.twc is taking over 10 seconds

And at the end, the issue was solved. However I am not sure that I am using a proper value for the setting connection_timeout.

If you could let me know if the value is correct I will appreciate it and I hope that the suggestion makes sense to add it to the documentation.

Thanks for this tool

franc6 commented 7 months ago

Looks like I need to proof-read a little better. The readme file should have said the timeout value is in seconds. So a timeout of 300 is about 5 minutes. I know, 300 seconds is exactly 5 minutes, but this is a float value, so 300 isn’t necessarily exactly 300, and besides, the timeout mechanism isn’t exact, either; and no, the choice of float was not mine, nor is the implementation of the timeout, for which we all should be grateful. :)

Im sorry about the confusion in the documentation. I’ll correct it next time I get back to this (which will likely be next month).