bruxy70 / Garbage-Collection

🗑 Custom Home Assistant sensor for scheduling garbage collection (or other regularly re-occurring events - weekly on given days, semi-weekly or monthly)
MIT License
383 stars 90 forks source link

cannot import name 'CalendarEventDevice' #436

Closed Marmoulak closed 1 year ago

Marmoulak commented 1 year ago

Before you submit a new bug report, please check that

Describe the bug

Hi Thanks for your useful integration.

I get this error Unable to prepare setup for platform garbage_collection.sensor: Platform not found (cannot import name 'CalendarEventDevice' from 'homeassistant.components.calendar' (/usr/src/homeassistant/homeassistant/components/calendar/init.py)).

info: Home Assistant 2022.11.1 Supervisor 2022.10.2 Operating System 9.3 Frontend 20221102.1 - latest Can you help?

Configuration

I can not access it. something is wrong.

Debug logs

2022-11-05 23:13:47.803 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform garbage_collection.sensor: Platform not found (cannot import name 'CalendarEventDevice' from 'homeassistant.components.calendar' (/usr/src/homeassistant/homeassistant/components/calendar/__init__.py)).
bruxy70 commented 1 year ago

Is this a new install or did it work before and then it stopped? I am unable to replicate it, it works and does not show the error both on my production and test. Let's see if more people have the issue, to find some commonalities perhaps.

Marmoulak commented 1 year ago

it worked perfectly before. I got the error after updates. I have tried to uninstall and install it again but didn't help. I can not see src folder under usr anymore. Could be that? /usr/src/homeassistant/homeassistant/components/calendar/init.py

bruxy70 commented 1 year ago

The calendar component should be part of the home assistant core I think, looking at the GitHub, I think you might be right, it should be there https://github.com/home-assistant/core/tree/dev/homeassistant/components/calendar But I use HA OS type of install, so I cannot verify.

marianbezeg commented 1 year ago

Running on same version without issue.

Home Assistant 2022.11.1 Supervisor 2022.10.2 Operating System 9.3

I'd same error after upgrade of HA to newest version with this component installed manually before upgrade. Now I've installed it via HACS and its running without any issues.

Marmoulak commented 1 year ago

as I see now in documentation "The configuration via configuration.yaml has been deprecated" and all my code are in configuration.yaml. according to documentation: Go to Settings/Devices & Services/Helpers, click on the + CREATE HELPER button, select Garbage Collection and configure the helper. I have uninstall and install it again. But I do not se in the Helper any Garbage Collection. se picture image and if I add it via Add integration it seems strange and no title. see this: image image

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had any activity in last 30 days. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.