JonasJoKuJonas / homeassistant-WebUntis

Custom component to access data from Web Untis in Home Assistant
https://community.home-assistant.io/t/webuntis-timetable-in-ha/568273
MIT License
52 stars 12 forks source link

Notifications IndexError #93

Closed KazemaRyukuro closed 12 months ago

KazemaRyukuro commented 12 months ago

I tried to set up the notifications for Discord for Untis. The notifications with the notify works with the target of my Discord channel ID. Tested it with a test message using the developer tools in HomeAssistant. That means the notifier works and can send messages in Discord. But now I have the problem that the Untis extension gives me the following error:

Logger: homeassistant.components.discord.notify Source: components/discord/notify.py:124 Integration: Discord First occurred: 07:56:01 (1 occurrences) Last logged: 07:56:01

No target specified

And another error:

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: homeassistant Source: custom_components/webuntis/notify.py:88 Integration: Web Untis (documentation, issues) First occurred: 09:06:01 (20 occurrences) Last logged: 10:41:01

Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/config/custom_components/webuntis/init.py", line 206, in async_update await self._async_status_request() File "/config/custom_components/webuntis/init.py", line 353, in _async_status_request await self.update_notify() File "/config/custom_components/webuntis/init.py", line 910, in update_notify notifications = get_notification(updated_items, self.notify_list) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/webuntis/notify.py", line 88, in get_notification message += f"Change (Room): {lesson_old['rooms'][0]['name']} -> {lesson['rooms'][0]['name']}"


IndexError: list index out of range

I do not know what exactly the problem is.

Übersetzt mit DeepL (https://www.deepl.com/app/?utm_source=ios&utm_medium=app&utm_campaign=share-translation)
JonasJoKuJonas commented 12 months ago

fixed bug should be working in next version

94