KoljaWindeler / ics

Integration that displays the next event of an ics link (support reoccuring events)
51 stars 12 forks source link

Since core-2022.4.0 it is not working anylonger #45

Closed Friedi1970 closed 2 years ago

Friedi1970 commented 2 years ago

I updated to core-2022.4.0 and since that I get the following error.

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: homeassistant.config
Source: custom_components/icscal/calendar.py:11
Integration: icscal (documentation)
First occurred: 11:16:33 (1 occurrences)
Last logged: 11:16:33

Platform error: calendar
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config.py", line 877, in async_process_component_config
    platform = p_integration.get_platform(domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 603, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 620, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/config/custom_components/icscal/__init__.py", line 2, in <module>
    from .calendar import VERSION
  File "/config/custom_components/icscal/calendar.py", line 11, in <module>
    from homeassistant.components.calendar import (ENTITY_ID_FORMAT,
ImportError: cannot import name 'calculate_offset' from 'homeassistant.components.calendar' (/usr/src/homeassistant/homeassistant/components/calendar/__init__.py)
Friedi1970 commented 2 years ago

It seems that this error is due to the core calendar change (LINK). Could you please fix this?

KoljaWindeler commented 2 years ago

jep .. that was removed here .. https://github.com/home-assistant/core/commit/f61c9111741df4e6c3059be522e169e622926e1a darn .. I'll have a look

KoljaWindeler commented 2 years ago

actually .. I don't use that function .. and ICSCAL is not this integration, this is ICS .. probably similar, but a different project.

https://github.com/tybritten/ical-sensor-homeassistant/commit/47bc76b8ca96f2df19d45d80aa7094ce9d7c0be7

Friedi1970 commented 2 years ago

actually .. I don't use that function .. and ICSCAL is not this integration, this is ICS .. probably similar, but a different project.

tybritten/ical-sensor-homeassistant@47bc76b

Yep, my fault. Sorry for that!!!