-
Notifications
You must be signed in to change notification settings - Fork 22
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
Error migrating calendar if connection_timeout is not set #151
Comments
I had the same error, but did not recognize, that it's a problem with a missing settings in the old configuration, so I returned to version 4.2.0. But this error is critical, because it stops HA from saving any new configuration. I added new integrations, that were all gone after a restart of HA. After going back to v4.2.0 and reinstalling my new integrations everything seems to work. |
Thanks @ccMatrix, I also had to include the reference to connection_timout to get the migration to proceed. I also found that new entities with _2 appended were created and I had to delete theold, and rename the new so they would work with all my templates and automations. |
I've not been able to reproduce this one so far -- my own import data never included connection_timeout, since it's not something I've ever needed to adjust. It'll probably be a while before I can get to this. :( |
I didn't have connection_timeout set before moving to 5.0.0 which is where the error came from. Setting it fixes it since then the default is no longer I'm running Home Assistant on a Raspberry Pi 4 via Docker It is possible that this might be different when on e.g. x86/amd64. Maybe others with the same problem also have it on arm ? |
This is what I observed as well. I had to create new ICS_Calendar entries, then I was able to see the old entities listed saying they were no longer provided by ICS Calendar. I was able to delete the old entries and rename the new ones I added to get everything working. I noticed as I was about to roll back to 4.2.0. |
I would recommend going back to 4.2.0, anyway for now. I am curious, though it shouldn’t make any difference for serializing, is anyone who sees this running HA on x86-64? |
Yes, mine is on x86-64 |
I see that in
The default value for connection_timeout is set to So this might be the reason why it tries to serialize an object? I didn't 100% understand yet where and how the serialization/conversion from the yaml config to the entity for HA happens in the migration process. |
Oh! Great thought! Look at
_GLOBAL_DEFAULT_TIMEOUT . If you have the time, feel free to make a PR if you can test it, too. That’s really what it should be, not None, anyway. If you (or someone) can test that, I’d really appreciate it.
|
I'm blind; I can reproduce this, and the change above doesn't help. If I can steal some time away today to work on this I will. |
My guess was that the object is initalized into a |
Since we already have a value to indicate if timeout is set, use that and change connection_timeout to be a positive_float. This fixes the serialization issues, which led to calendars disappearing on restart of HA, and other kinds of havoc. Also fixed name and unique id properties Fixes #151 Description of change: ## Formatting, testing, and code coverage Please note your pull request won't be accepted if you haven't properly formatted your source code, and ensured the unit tests are appropriate. Please note if you are not running on Windows, you can either run the scripts via a bash installation (like git-bash). - [X] formatstyle.sh reports no errors - [X] All unit tests pass (test.sh) - [X] Code coverage has not decreased (test.sh)
I've updated ics_calendar from latest 4 to 5 and had the following error in the log:
I did not have
connection_timeout
set in the yaml configuration. After I saw the error I added a lineconnection_timeout: 15
to the yaml and restarted home assistant which imported the yaml configuration into the core.config_entries file properly.The text was updated successfully, but these errors were encountered: