PaarthShah / matrix-nio-hacs

A HACS Integration to replace the core matrix Home Assistant integration.
14 stars 3 forks source link

error for token login failure #5

Closed furrnace closed 1 year ago

furrnace commented 1 year ago

System Health details

no need, known issue

Checklist

Describe the issue

when the matrix login happens this ntegration first tries to use the token in .matrix.conf and fails and logs an error. Then it tries the password and succeeds. although the integration is successfully logged in there remains the error in the HA log, which is misleading.

it would be better to log a warning or info when token login fails and only log an error, if no login option did work.

Reproduction steps

  1. enable debug logging for better understanding of what is happening
  2. restart HA
  3. watch full log
  4. ...

Debug logs

DEBUG (MainThread) [custom_components.matrix] Logging in using stored token
WARNING (MainThread) [custom_components.matrix] Login by token failed: M_FORBIDDEN, Invalid login token
DEBUG (MainThread) [custom_components.matrix] Logging in using password

Diagnostics dump

no need