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

invalid school name/id for school with spaces in the name #104

Closed Kurty00 closed 9 months ago

Kurty00 commented 9 months ago

The problem

The school name my school includes a space. This causes the setup to give me an "invalid school name/id" error, even if I escape the space with a + like the loginpage does.

Version of Home Assistant?

2024.1.3

What type of installation are you running?

Home Assistant Container

Version of WebUntis

unknown

Last working WebUntis version

No response

Traceback/Error logs

2024-01-15 11:50:43.954 ERROR (MainThread) [frontend.js.latest.202401040] Uncaught error from Firefox 122.0 on Windows 10 TypeError: can't access property "domain", i is undefined integration (src/panels/config/integrations/dialog-add-integration.ts:464:4) item (src/virtualize.ts:116:53) r (src/directives/repeat.ts:56:28) ct (src/directives/repeat.ts:93:52) update (src/directive.ts:134:16) $AS (src/lit-html.ts:1085:23) S (src/lit-html.ts:1362:12) $AI (src/async-directive.ts:366:18) setValue (src/virtualize.ts:139:13) dispatchEvent (src/Virtualizer.ts:808:23)

Additional information

mese.webuntis.com

JonasJoKuJonas commented 9 months ago

This looks like a browser issue to me. Have you tried to set up the integration from a different device or browser?

Kurty00 commented 9 months ago

Tried around a bit more. Turns out I had to urlencode the school name, so using '%20' as an escape sequence.