Skip to content

Error when changing code #13

Description

@stefanolson

I'm testing with 1.1. Looks like I may have added my user with the wrong pin code, because I can't arm currently.

So tried to change the code (entered what I think was the old code, but most likely wrong code, and new code x2) and got the following error:
Something went wrong!

Response error: 500

Please report the bug.

Log details:
Logger: aiohttp.server
Source: custom_components/alarmo/init.py:155
First occurred: 9:21:32 AM (3 occurrences)
Last logged: 9:31:46 AM

Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 127, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 129, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 60, in wrapper
result = await method(view, request, *args, **kwargs)
File "/config/custom_components/alarmo/websockets.py", line 190, in post
coordinator.async_update_user_config(user_id, data)
File "/config/custom_components/alarmo/init.py", line 138, in async_update_user_config
elif not self.async_authenticate_user(data[ATTR_OLD_CODE], user_id):
File "/config/custom_components/alarmo/init.py", line 155, in async_authenticate_user
if not user[ATTR_CODE] and not code:
TypeError: 'UserEntry' object is not subscriptable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions