Swedish calendar

Same for me

Same for me. . Darn :smile:

Same for me. A lot off error in logs while setting up swedish_calendar platform Is the project still alive?

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 178, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for return fut.result()
File “/config/custom_components/swedish_calendar/sensor.py”, line 65, in async_setup_platform await themeSensor.fetching_data()
File “/config/custom_components/swedish_calendar/sensor.py”, line 282, in fetching_data async_call_later(self.hass, get_seconds_until_midnight(), self.fetching_data)
File “/usr/src/homeassistant/homeassistant/helpers/event.py”, line 267, in async_call_later hass, action, dt_util.utcnow() + timedelta(seconds=delay)
File “/usr/src/homeassistant/homeassistant/helpers/event.py”, line 252, in async_track_point_in_utc_time async_unsub = hass.bus.async_listen(EVENT_TIME_CHANGED, point_in_time_listener)
AttributeError: ‘NoneType’ object has no attribute ‘bus’`

Upgrade to 112.3 and now its working again. Strange!

0.112.4 breakes it again :joy:

I have posted an agenda style similar thing some time ago if that is interesting for anyone.

Does special themes work for you on 0.112.4.it is the only thing that works someone who solved the error? on the rest

It displays the last known entity but it is not working, for me it has shown “internationella dagen för oskadliggörande av handeldvapen” and that was july 3.

I saw some errors aswell but assumed that it was an intermittent release that broke it and that the major 0.112 would be fine. Very much stll maintained so I will look into the problem. Suspecting that I might have used someting that has been deprecated :slight_smile:

1 Like

It seems that special themes failed if the entity_id was already present (which was always the case since it was hardcoded). Since we nowadays can change our entity_ids in the UI I removed it completely, and instead updated the name of the sensor to “Swedish Calendar theme day” (thus the generated entity_id will remain the same and you don’t have to use change your UIs).

I have updated to HA core 0.112.4, and running the latest swedish_calendar I now get both the normal sensors plus the special themes (note that today 14th July there is no special theme).

@Christian_Hollbjar @sbobergje @Chrichton @leiyt If you update the calendar to latest version (on master branch, pushed a few mnutes ago), do you still get errors?

2 Likes

Now it works with both 0.112.3 and 0.112.4. Thanks for the update.

1 Like

works for me to with 0.112.4. Thanks for the update.

1 Like

works like a charm again! awsome work!! Thanks!

1 Like

I noticed today that the Swedish calendar stopped updating a few days ago, and unfortunately it seems like the API behind it has been retired. The PHP source is available if anyone is willing to host it, unless there is any other public API available that provides similar features.

Ping @Miicroo

I read through the code and it seems quite basic.
The only thing I can see that needs to be changed is the strtotime() functions which is used quite heavily.
As far as I know it will soon stop working.

Hmm, looks like the problem has been solved already - a company called Faboul AB has taken over hosting and development of the API. Looks like the old API endpoint URL still works but should be updated, when possible.

Sedan September 2020 så övertogs driften av Svenska helgdagar APIet av Faboul AB från dryg.net. Vi ber er att uppdatera era länkar till sholiday.faboul.se.

1 Like

Awesome, I will update the endpoint! Thanks for the heads up!

1 Like

@Miicroo where has the repo gone? Have you killed the project?

Edit: nevermind! I had lost the repo in hacs and the one in the first post was wrong. Found the repo again.

1 Like

Updated the link in the first post in case anyone else gets the same problem :slight_smile:

1 Like

Hi! Next version will end your component if not updated.
2021-05-16 23:44:11 ERROR (MainThread) [homeassistant.loader] No ‘version’ key in the manifest file for custom integration ‘swedish_calendar’. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of ‘swedish_calendar’

1 Like