Giter Site home page Giter Site logo

jonasjokujonas / homeassistant-webuntis Goto Github PK

View Code? Open in Web Editor NEW
38.0 4.0 8.0 308 KB

Custom component to access data from Web Untis in Home Assistant

Home Page: https://community.home-assistant.io/t/webuntis-timetable-in-ha/568273

License: MIT License

Python 100.00%
homeassistant-custom-component webuntis webuntis-api webuntis-client hacs home-assistant home-automation homeassistant school

homeassistant-webuntis's Introduction

github contribution grid snake animation github contribution grid snake animation

GitHub stats

Top Langs

My Projects

Readme Card

Readme Card

Readme Card

"Buy Me A Coffee"

homeassistant-webuntis's People

Contributors

buzz-tee avatar finn-str avatar iot-enthusiast avatar jonasjokujonas avatar niklas2290 avatar queeek avatar ralle12345 avatar taraman17 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

homeassistant-webuntis's Issues

Unerwarteter Fehler bei Eingabe der Zugangsdaten

Bei Eingabe der Daten laut der readme kommt nur die Meldung "Unerwarteter Fehler".

Aus dem Link https://borys.webuntis.com/WebUntis/?school=Gym+JuM+Ochtrup#/basic/login habe ich folgendes übernommen:

Server = borys.webuntis.com
Schule = Gym+JuM+Ochtrup

Die Zugangsdaten sind Klassenweise vergeben, daher waren neben den zugeteilten Benutzer und Passwort meine weiteren Einstellungen:

Stundenplan Quelle = klasse
Ganzer Name = 09c (identisch zum Benutzernamen)

Was mache ich falsch bzw. kann was könnte ich ausprobieren?

List index out of range

Since prev. version I am not able to use the component any more. I am getting this error

2022-12-16 20:06:11.415 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry .... for webuntis
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 372, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/webuntis/init.py", line 49, in async_setup_entry
await server.async_update()
File "/config/custom_components/webuntis/init.py", line 133, in async_update
await self._async_status_request()
File "/config/custom_components/webuntis/init.py", line 183, in _async_status_request
self.next_class = await self._hass.async_add_executor_job(self._next_class)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/webuntis/init.py", line 292, in _next_class
lesson = lesson_list[0]
IndexError: list index out of range

Iam Login

I tried to connect to my webunits but I need to use the IAM id on the page

(School is LLLIS )

How can I do it

Cordialement

"student not found" error on adding integration

The problem

When configuring the integration I get the error in the issue title. How do I find out, which Name String to use here? Is this something I can find out on the Untis WebPortal?

Version of Home Assistant?

2023-09-02

What type of installation are you running?

Home Assistant Core

Version of WebUntis

v0.6.0

Last working WebUntis version

No response

Traceback/Error logs

No response

Additional information

No response

Feature request: setting for calendar-event naming using "long_name" or "name"

Thank You for this integration! It works well for me and the addition of the calendar is a significant improvement!

In my school they seem to use the "long_name" not for the full name of the lesson, but for only a Number. So as the lessons are titled with the "long_name" attribute the calendar is not comprehensive. To overcome I just changed the reference to "long_name" to "name" in the code manually.

I think it would be great not only for my case if there was a switch/setting to choose between the use of "name" or "long_name".
Perhaps this could be included?

Bug: max days in atomic-calendar-revive

Der neue Kalender verhält sich anders als andere Kalender (Google Calender) in HA.

In dem Custom-Calender "https://github.com/totaldebug/atomic-calendar-revive/" funktioniert die Anzeige der "Max days to show" nicht.

Ich kann leider nicht prüfen, ob dies ein Problem des untis-Kalender-Sensors ist, oder von atomic-calender.

Beispiel - so funktioniert es mit einem Google Calender:

type: custom:atomic-calendar-revive
name: Calendar Card
enableModeChange: true
entities:

  • entity: calendar.familie
    name: Familie
    firstDayOfWeek: 1
    maxDaysToShow: 1
    refreshInterval: 60

Bei dem Untis-Kalender hat der Parameter "maxDaysToShow" keine Wirkung:
type: custom:atomic-calendar-revive
name: Calendar Card
enableModeChange: true
entities:

  • entity: calendar.xxxxx_webuntis_calender
    name: WebUntis Calender
    firstDayOfWeek: 1
    maxDaysToShow: 1
    refreshInterval: 60

Häufiger Logeintrag "no right for getTeachers()"

The problem

Hallo Jonas,

mein Log ist voll von diesen Zeilen hier:

2023-01-05 20:27:57.907 ERROR (SyncWorker_9) [webuntis] {'jsonrpc': '2.0', 'id': '2023-01-05 20:27:57.868278', 'error': {'message': 'no right for getTeachers()', 'code': -8509}}

Das wurde schon mal als Bug gemeldet und gefixt (#28), besteht aber offensichtlich immer noch...

Version of Home Assistant?

2022.12.3

What type of installation are you running?

Home Assistant Container

Version of WebUntis

0.3.5

Last working WebUntis version

No response

Traceback/Error logs

No response

Additional information

No response

heutigen/morgigen Stundenplan in sensor

Hallöchen,

erstmal vielen Dank für die Implementierung, habe jetzt den Wecker unserer Tochter entsprechend automatisiert :)

Kannst du evt. noch mehr Infos z.B. über die heutigen/morgigen Stundenplan einbauen? Evt. auch einfach in den Class Entry in die Attribute?

Error: startDate and endDate are not within a single school year.

The problem

Ich bekomme in Untis eine Fehlermeldung, siehe unten.
Hinweis: Ich bin in NRW, dort endet das Schuljahr am 26. Juni 2023.

(Naue des Schülers und der Schule habe ich unkenntlich gemacht)

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.webuntis
Source: custom_components/webuntis/init.py:244
Integration: Web Untis (documentation, issues)
First occurred: 13:15:03 (241 occurrences)
Last logged: 21:25:58

Updating the propertie next_class of 'XXX-Schule@Name_Vorname_20110914' failed - OSError: startDate and endDate are not within a single school year.
Updating the propertie next_lesson_to_wake_up of 'XXX-Schule@Name_Vorname_20110914' failed - OSError: startDate and endDate are not within a single school year.
Updating the propertie calendar_events of 'XXX-Schule@Name_Vorname_20110914' failed - OSError: startDate and endDate are not within a single school year.
Login to WebUntis XXX-Schule@Name_Vorname_20110914' failed - OSError: HTTPSConnectionPool(host='borys.webuntis.com', port=443): Max retries exceeded with url: /WebUntis/jsonrpc.do?school=XXX-Schule (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f77c82490>, 'Connection to borys.webuntis.com timed out. (connect timeout=None)'))

Version of Home Assistant?

2023.6

What type of installation are you running?

Home Assistant OS

Version of WebUntis

v0.5.4

Last working WebUntis version

No response

Traceback/Error logs

No response

Additional information

No response

No rights for timetable.

The problem

Hallo,

Ich habe ein Problem mit der Verbindung nachdem alle Accounts in der Schule zum neuen Schuljahr zurückgesetzt wurden.

Nutze ich die Timetable Source Student bekomme ich „No rights for timetable.“, nutze ich klasse bekomme ich eine Unhandled Exception.

Version of Home Assistant?

2023.8.1

What type of installation are you running?

Home Assistant OS

Version of WebUntis

v0.6.0

Last working WebUntis version

No response

Traceback/Error logs

No response

Additional information

No response

Merge calendar

The calendar integration with Home Assistant works flawlessly. Thank you!
I would appreciate the possibility that you can synchronise your subjects in a Google Calendar integrated into HomeAssistant. So that the timetable is also in your normal Google calendar.

Best regards

Can't load calendar in v02.0 OSError(107, 'Socket not connected')

In v0.2.0-beta, I was able to load a calendar.
After updating to v0.20 (without beta), the calendar no longer loads.
I get the following logs:

logger: custom_components.webuntis
Source: custom_components/webuntis/init.py:48
Integration: Web Untis (documentation, issues)
First occurred: 09:35:06 (1 occurrences)
Last logged: 09:35:06

Login to WebUntis 'schuleXXXXX@nameXXXXX' failed - OSError: ('Connection aborted.', OSError(107, 'Socket not connected'))

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/webuntis/calendar.py", line 28, in async_setup_entry
entities = [UntisCalendar(server)]
File "/config/custom_components/webuntis/calendar.py", line 47, in init
self.events.sort(key=lambda e: (e.start, e.end))
AttributeError: 'NoneType' object has no attribute 'sort'

Change timetable source for new school year?

With the new schoolyear, I assume I have to change the time table source (from class 6 to class 7 in my case).
Is this possible in the UI without a complete new configuration from scratch or editing the file manually in /config/.storage/core.config_entries?

Kalender wirft Fehler 'no right for getTeachers()'

Hallo Jonas,

offenbar kann unser User in WebUntis keine Lehrerdaten abrufen:

2022-12-12 08:56:34.156 ERROR (SyncWorker_5) [webuntis] {'jsonrpc': '2.0', 'id': '2022-12-12 08:56:33.995009', 'error': {'message': 'no right for getTeachers()', 'code': -8509}}

Der Kalender wird zwar angelegt, ist aber leer.

Connection reset by peer (on niobe.webuntis.com)

Don't know if this is an integration error or a server side error, happen since 2 days, reload integration doesn't help. Reinstall helped short time but after some time all sensors are reappear with unknown. Niobe (WebUntis) Webinterface is working fine.

This error originated from a custom integration.

Logger: custom_components.webuntis
Source: custom_components/webuntis/init.py:49
Integration: Web Untis (documentation, issues)
First occurred: December 21, 2022 at 21:09:28 (3 occurrences)
Last logged: 15:46:58

Login to WebUntis 'siegtal-gym@XXXXXXXX' failed - OSError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
Login to WebUntis 'siegtal-gym@XXXXXXXX' failed - OSError: ('Connection aborted.', OSError(107, 'Socket not connected'))

how to support more than one account?

Hi.

Is it possible to integrate two accounts with the same school URL (but different sets of (Username, Password) ), i. e. kid1 and kid2?

My first workaround idea was to "double" the integration using two subdirs (e. g. ".../webuntis" and ".../webuntis2") and assign different credentials to each during integration, but since there is one central repository for the configuration (.storage/core.device-* and core.config-*) this might end up in a mess.

A feature or workaround would be useful.

only show selectet subjects

i have the problem every student has an other lesson (4 lessons parallel) plan but on web untis are listed all of tham, so my wish is to select only the subjects i have!

Wecker

Eine Möglichkeit einen Wecker zu erstellen (z.B. in IOS mit der Wecker App) welcher eine beliebige Zeit vor sensor.user_name_next_lesson_to_wake_up klingelt.

Stundenausfall

Guten Tag zusammen,
ich habe gesehen, dass man in der Konfiguration von HA einstellen kann, dass man ausfallende
Stunden im Kalender ausblenden kann.
image

Leider funktioniert das bei mir nicht, da die Lehrer die Stunden nicht als "Ausfall" kennzeichnen, sondern
einfach in den Vertretungstext die Information hinzufügen, dass der Unterricht ausfällt.
image
image

Es wäre also echt schön, wenn es eine Funktion gäbe sich den Vertretungstext in der json ausgeben zu lassen bzw.
wenn man es weiterführen möchte, dann die Möglichkeit geben, dass man im Vertretungstext nach Stichwörtern wie "fällt aus, Ausfall, entfällt, aufgaben im e-learning, für zuhause" sucht und diese Stunde dann als Ausfall gekennzeichnet wird.

Vielleicht ist das ja auch schon zu kompliziert gedacht und es gibt schon eine Möglichkeit, vielen Dank und mfg
Niklas

Aufruf des Klassenkalenders ohne Login

Hallo,
unsere Schule hat keinen Login, sondern man kann ohne Login in das Menü und hier auf Stundenplan klicken. Dann wählt man die Klasse aus und sieht den Kalender. In Deiner Integration sind die Felder für Benutzernamen und Passwort jedoch zwingend erforderlich. Kannst du hier eventuell optionale Felder daraus machen?

NullPointerException during holidays /end of school year

The problem

Summer Holidays started in NRW, so the untis app shows "Kein aktives Schuljahr".
This seems to cause a NPE in the integration

Version of Home Assistant?

2023.6

What type of installation are you running?

Home Assistant OS

Version of WebUntis

v0.5.6

Last working WebUntis version

No response

Traceback/Error logs

Logger: custom_components.webuntis
Source: custom_components/webuntis/init.py:199
Integration: Web Untis (documentation, issues)
First occurred: 26. Juni 2023 um 12:10:30 (1731 occurrences)
Last logged: 17:05:33

Updating the propertie is_class of 'Beispiel-Schule@Name_Vorname_01012000' failed - OSError: java.lang.NullPointerException
Updating the propertie next_class of 'Beispiel-Schule@Name_Vorname_01012000' failed - OSError: java.lang.NullPointerException
Updating the propertie next_lesson_to_wake_up of 'Beispiel-Schule@Name_Vorname_01012000' failed - OSError: java.lang.NullPointerException
Updating the propertie calendar_events of 'Beispiel-Schule@Name_Vorname_01012000' failed - OSError: java.lang.NullPointerException
Updating the propertie today-sensor of 'Beispiel-Schule@Name_Vorname_01012000' failed - OSError: java.lang.NullPointerException

Additional information

No response

Add a sensor that contains the end of the school day

Please add a sensor to the integration that provides the end of the last hour of the current day

Purpose:
Show the time when the school is over for today. This can either be used in a dashboard or to trigger automations like heating.

Extended solution:
school_start_today & school_end_today
The combination of start & end allow some further presence based automations concerning climate.

Stundenplan + Alexa

Ich habe den script gesehen in der HACS kommunity der anzeigt wie man den ganzen plan bestimmen kann aber möchte diesen nun mit alexa media player über die automatisierung nutzen.Ich kann hierführ den service notify benutzen kann auch templates benutzen da kommt nur folgender fehler vor: JSONDecodeError: Input must be bytes, bytearray, memoryview, or str: line 1 column 1 (char 0)
könnten sie mir vill. einen code senden den ich auch benutzen könnte? LG Anton

original_teachers bleibt bei Vertretungstunden leer

The problem

Bei Vertretungstunden wird im Json von _next_lesson_to_wake_up kein Wert in "original_teachers" angezeigt.
Für "original_rooms" werden hingegen Werte angezeigt.

Beispiel:

{
"code": "None",
"end": "2023-03-29 15:55:00+02:00",
"id": 1647634,
"klassen": [
{
"long_name": "Klasse xx",
"name": "xx"
}
],
"lstext": "",
"original_rooms": [
{
"long_name": "Schulsporthalle ",
"name": "SH"
}
],
"original_teachers": [
],
"rooms": [
{
"long_name": "Klassenraum xx",
"name": "Kxx"
}
],
"start": "2023-03-29 15:10:00+02:00",
"subjects": [
{
"long_name": "Sport",
"name": "SP"
}
],
"substText": "Schnupperunterricht Franz\u00f6sisch",
"type": "ls"
}

Version of Home Assistant?

2023.3.6

What type of installation are you running?

Home Assistant OS

Version of WebUntis

v0.5.0

Last working WebUntis version

No response

Traceback/Error logs

No response

Additional information

No response

Falsches Datenformat

The problem

2023-04-27 08:00:00+02:00 Is a date not a number

Version of Home Assistant?

Newest

What type of installation are you running?

Home Assistant OS

Version of WebUntis

V0.53

Last working WebUntis version

V0.51 denke ich

Traceback/Error logs

Error initializing 'Schule Unterricht' trigger: In 'numeric_state' condition: entity sensor.xxxx_xxxxx_next_lesson_to_wake_up state '2023-04-27 08:00:00+02:00' cannot be processed as a number

Additional information

No response

After installation error: JSON data is disabled - activate it in the options

Hello,
I wanted to connect my home assistant to webuntis. After some problems with seeing the komma between first_name and last_name, it connected very easy. But now, I the sensors and it says:
lesson: JSON data is disabled - activate it in the options
device_class: timestamp
icon: mdi:table-clock
friendly_name: Nic_Fonse_20120812 Next Class

And:
day: >-
[JSON data is disabled - activate it in the options, JSON data is disabled -
activate it in the options, JSON data is disabled - activate it in the
options, JSON data is disabled - activate it in the options, JSON data is
disabled - activate it in the options, JSON data is disabled - activate it in
the options, JSON data is disabled - activate it in the options, JSON data is
disabled - activate it in the options, JSON data is disabled - activate it in
the options, JSON data is disabled - activate it in the options, JSON data is
disabled - activate it in the options, JSON data is disabled - activate it in
the options, JSON data is disabled - activate it in the options, JSON data is
disabled - activate it in the options, JSON data is disabled - activate it in
the options, JSON data is disabled - activate it in the options, JSON data is
disabled - activate it in the options, JSON data is disabled - activate it in
the options, JSON data is disabled - activate it in the options, JSON data is
disabled - activate it in the options]
device_class: timestamp
icon: mdi:clock-start
friendly_name: Nic_Fonse_20120812 Next lesson to wake up

Where am I able to activate JSON data?
Kind regards
Sagresbier

Kalenderergänzung

Vielen lieben Dank für deine Integration!

Könntest du probieren eine Tages/Wochen Schulstunden-Ansicht zu integrieren?

Liebe Grüße

Next Class not working anymore

The problem

Hi,

the next class property isn't working anymore, I think the teacher has screewed it up with an problematic entry. I get this error message in the log files:

[webuntis] {'jsonrpc': '2.0', 'id': '2023-05-31 10:04:54.013452', 'error': {'message': 'startDate and endDate are not within a single school year.', 'code': -8507}}

Version of Home Assistant?

2023.5.4

What type of installation are you running?

Home Assistant OS

Version of WebUntis

v0.5.4

Last working WebUntis version

No response

Traceback/Error logs

[webuntis] {'jsonrpc': '2.0', 'id': '2023-05-31 10:04:54.013452', 'error': {'message': 'startDate and endDate are not within a single school year.', 'code': -8507}}

Additional information

No response

Fehler bei der Konfiguration der Filter

The problem

Fehler beim Konfigurieren der Integration.

Bei der Konfiguration der Filter erscheint ein Filter

image image image

Version of Home Assistant?

2023.6

What type of installation are you running?

Home Assistant OS

Version of WebUntis

v0.5.5

Last working WebUntis version

No response

Traceback/Error logs

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: homeassistant.config_entries
Source: custom_components/webuntis/init.py:192
Integration: Web Untis (documentation, issues)
First occurred: 21:59:49 (2 occurrences)
Last logged: 22:03:19

Error setting up entry lastname_firstname_20110914 for webuntis
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/webuntis/init.py", line 44, in async_setup_entry
server = WebUntis(hass, unique_id, entry)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/webuntis/init.py", line 192, in init
self.notify_entity_id = config.options["notify_entity_id"]
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
KeyError: 'notify_entity_id'

Additional information

No response

Anonymer Zugang

Erst mal vielen Dank für die Implementierung,

kannst du noch einen Zugang für anonyme Benutzer hinzufügen?
Manche Schulen haben keinen Zugang für Schüler eingerichtet

No rooms found

Hallo Jonas, kannst du damit was anfangen. Guten Rutsch!

xxx steht für meinen Benutzernamen.

2022-12-31 09:27:59.430 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry xxx for webuntis
File "/config/custom_components/webuntis/init.py", line 52, in async_setup_entry
server = WebUntis(hass, unique_id, entry)
File "/config/custom_components/webuntis/init.py", line 134, in init
2022-12-31 09:29:10.610 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry xxx for webuntis
File "/config/custom_components/webuntis/init.py", line 52, in async_setup_entry
server = WebUntis(hass, unique_id, entry)
File "/config/custom_components/webuntis/init.py", line 134, in init
2022-12-31 09:29:32.784 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry xxx for webuntis
File "/config/custom_components/webuntis/init.py", line 54, in async_setup_entry
File "/config/custom_components/webuntis/init.py", line 178, in async_update
File "/config/custom_components/webuntis/init.py", line 268, in _async_status_request
File "/config/custom_components/webuntis/init.py", line 423, in _get_events
File "/usr/local/lib/python3.10/site-packages/webuntis/objects.py", line 180, in getitem

Invalid Credentials error but the data is definitely correct

The problem

I get the error "invalid Credentials" even though I am sure that they are correct

Version of Home Assistant?

2023.5.4

What type of installation are you running?

Home Assistant OS

Version of WebUntis

v0.5.5

Last working WebUntis version

Never worked

Traceback/Error logs

Logger: webuntis
Source: /usr/local/lib/python3.10/site-packages/webuntis/utils/logger.py:19
First occurred: 08:02:39 (2 occurrences)
Last logged: 08:08:02

{'jsonrpc': '2.0', 'id': '2023-06-04 08:02:39.574104', 'error': {'message': 'bad credentials', 'code': -8504}}
{'jsonrpc': '2.0', 'id': '2023-06-04 08:08:02.020860', 'error': {'message': 'bad credentials', 'code': -8504}}

Additional information

No response

Time zone issue

The component as such works fine for me, but all times use the wrong time zone.

The first lesson starts at 8 AM local time. Although my HA instance is set to "(GMT+01:00) Berlin" time zone, the sensors show me the time in UTC time zone: 2022-11-10T08:00:00+00:00.

As a consequence, everything is shifted by one hour, the binary_sensor switches to "on" at 09:00 instead of 08:00 etc.

Could you please check that? Thanks in advance! :-)

JSON Attribute ignorieren Blacklist

The problem

Hallo,

Ich habe mehrere Fächer auf der Blacklist, da ja Religion z.B. gleichzeitig ev und kath eingetragen sind, Wahlfächer ebenfalls parallel. Im Kalender der ist alles okay nur die JSON Attribute enthalten weiterhin alle Fächer, was doof ist, da ich diese ja für die Sprachausgabe nutze.

Version of Home Assistant?

2023.2.1

What type of installation are you running?

Home Assistant OS

Version of WebUntis

v0.4.2

Last working WebUntis version

No response

Traceback/Error logs

No response

Additional information

No response

Feature request: new messages, calendar

Nice idea and great potential.

Would very much like to see a fucntionality that displays new messages, a new messages counter or the like.
Also, importing the calendar could be useful.

Essentially, exposing all information of Untis would be useful, as it would allow to work around the rather ugly app/web interface.

Vertretungsstunden/Raumänderungen im Kalender hervorheben

In der Untis-App werden mir Änderungen an Raum oder Lehrer angezeigt. So dass man z.B. sieht dass ein für Sport die Vertretung im Klassenraum durch einen anderen Lehrer stattfindet.
Wäre toll, wenn man diese Info auch im Kalender anzeigen könnte. Den Ort kann ich mir ja anzeigen lassen, das wird auch der aktuelle Ort angezeigt.

Schön wäre, wenn man vor dem Fach einen Hinweis auf Änderungen an Ort oder Lehrer einblenden könnte, ähnlich wie "Cancelled", wenn man sich ausgefallene Stunden anzeigen lässt.
Wenn man sieht, dass es bei einer Stunde Änderungen gibt, kann man dann für die Details die Untis-App öffnen

IMG_5080

substText im Kalender als Description anzeigen

Der Info-Text aus dem Feld substText sollte im Kalender als Description angezeigt werden.
Beispiel-Json aus dem Sensor "_next_lesson_to_wake_up":

{
    "code": "None",
    "end": "2023-03-29 15:55:00+02:00",
    "id": 1647634,
    "klassen": [
        {
            "long_name": "Klasse xx",
            "name": "xx"
        }
    ],
    "lstext": "",
    "original_rooms": [
        {
            "long_name": "Schulsporthalle",
            "name": "SH"
        }
    ],
    "original_teachers": [
    ],
    "rooms": [
        {
            "long_name": "Klassenraum xx",
            "name": "xx"
        }
    ],
    "start": "2023-03-29 15:10:00+02:00",
    "subjects": [
        {
            "long_name": "Sport",
            "name": "SP"
        }
    ],
    "substText": "Schnupperunterricht Franz\u00f6sisch",
    "type": "ls"
}

Backend Daten von request ausschließen

Moin, ich bin mir nicht sich ob das eine Fehler oder etwas anderes ist. Und zwar wenn man in den Backend Einstellungen von der Integration ist bei bei: "Daten von request ausschließen" immer teachers ausgewählt. Wenn ich es da heraus nehme und dann Speicher ist es beim nächsten mal wieder da. Das Problem, was ich denke ,dadurch entsteht ist, dass ich in den JSON nicht sehe welchen Lehrer ich habe.
image
image

MFG

Veranstaltungen im Kalender anzeigen

In Untis gibt es einen Typ "Veranstaltungen". Diese werden aktuell nicht im Kalender angezeigt.
Der Screenshot zeigt eine eine Veranstaltung "Haus Ruhrnatur" in der Untis-App.
Im HA-Kalender ist diese Veranstaltung nicht zu sehen. Es wäre schön, wenn diese auch angezeigt werden könnten.
IMG_5085
IMG_5084

Error setting up entry Klassenplan for webuntis

The problem

Hallo,
ich habe ohne Probleme den Stundenplan der Klasse 11 (Leistungskurssystem im Gymnasium) einrichten können, aber nicht den (für meinen Sohn richtigen) Stundenplan der Klasse 06b.
Es erscheint die Fehlermeldung "Error setting up entry Klassenplan for webuntis" und folgende Protokolldetails:

Version of Home Assistant?

2023.1.6

What type of installation are you running?

Home Assistant OS

Version of WebUntis

v0.3.5

Last working WebUntis version

No response

Traceback/Error logs

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: homeassistant.config_entries
Source: custom_components/webuntis/init.py:432
Integration: Web Untis (documentation, issues)
First occurred: 17:49:31 (2 occurrences)
Last logged: 17:49:57

Error setting up entry Klassenplan for webuntis
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/webuntis/init.py", line 54, in async_setup_entry
await server.async_update()
File "/config/custom_components/webuntis/init.py", line 178, in async_update
await self._async_status_request()
File "/config/custom_components/webuntis/init.py", line 268, in _async_status_request
self.calendar_events = await self._hass.async_add_executor_job(
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, self.kwargs)
File "/config/custom_components/webuntis/init.py", line 432, in _get_events
if lesson.rooms:
File "/usr/local/lib/python3.10/site-packages/webuntis/utils/misc.py", line 30, in get
obj.dict[self.name] = result = self.fget(obj)
File "/usr/local/lib/python3.10/site-packages/webuntis/objects.py", line 352, in rooms
return self._session.rooms(from_cache=True).filter(
File "/usr/local/lib/python3.10/site-packages/webuntis/objects.py", line 163, in filter
data=[self.filter(
{key: v})[0]
File "/usr/local/lib/python3.10/site-packages/webuntis/objects.py", line 163, in
data=[self.filter(**{key: v})[0]
File "/usr/local/lib/python3.10/site-packages/webuntis/objects.py", line 180, in getitem
data = self._data[i] # fails if there is no such item
IndexError: list index out of range

Additional information

No response

Event Entities for changes

I just installed the latest version with the new notify settings.

This is a great idea - i used to parse json to detect room changes for example.

However, I would like to suggest to use the new event entities (introdoced in HA 2023.8), for a more versatile usage.

For example, I would like to show a conditional card on my dashboard instead of getting a notification.
Events could be used to trigger an automation, which could send a notification, but also to change the state of a helper entity etc.

Does the integration trigger events already, which could be used in an automation?

Feature Request: Stundenausfälle anzeigen

Fällt eine Stunde aus, wird diese im Untis-Stundenplan angezeigt, in dem der Text bzw. die Stunde durchgestrichen ist.
image
image

In den Screenshots sieht man, dass z.B. die erste Stunde Sport ausfällt und durch eine Vertretungsstunde Deutsch ersetzt wird.

Es wäre schön, wenn die Kalender-Ansicht solche Ausfälle ebenfalls anzeigen kann.
Gerne einfach mit einem zusätzlichen Text in dem abgesagten Ereignis, das ist m.E. besser als diese Termine einfach aus dem Kalender zu entfernen.

Get a notification when a lesson is cancelled

I think the title describes the function quite well. It would be really helpful if you get a notification when a lesson is cancelled, so that you don't always have to check whether the schedule has been updated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.